function Test.has
has<
T extends Testing,
X,
>
(
k: keyof X,
value?:
boolean
| number
| bigint
| symbol
| null
| undefined
,
): Step<T, unknown>

Confirm that object has key. Optionally, confirm predicates about the value of that key.

Type Parameters

T extends Testing

Parameters

k: keyof X
optional
value:
boolean
| number
| bigint
| symbol
| null
| undefined

Return Type

Step<T, unknown>
has<
T extends Testing,
X,
>
(
k: keyof X,
proto: { [[Symbol.hasInstance]](_: unknown): boolean; },
): Step<T, unknown>

Type Parameters

T extends Testing

Parameters

k: keyof X
proto: { [[Symbol.hasInstance]](_: unknown): boolean; }

Return Type

Step<T, unknown>
has<
T extends Testing,
X,
>
(
k: keyof X,
type: "boolean",
value?: boolean,
...check: Step<T, unknown>[],
): Step<T, unknown>

Type Parameters

T extends Testing

Parameters

k: keyof X
type: "boolean"
optional
value: boolean
...check: Step<T, unknown>[]

Return Type

Step<T, unknown>
has<
T extends Testing,
X,
>
(
k: keyof X,
type: "number",
value?: number,
...check: Step<T, unknown>[],
): Step<T, unknown>

Type Parameters

T extends Testing

Parameters

k: keyof X
type: "number"
optional
value: number
...check: Step<T, unknown>[]

Return Type

Step<T, unknown>
has<
T extends Testing,
X,
>
(
k: keyof X,
type: "bigint",
value?: bigint,
...check: Step<T, unknown>[],
): Step<T, unknown>

Type Parameters

T extends Testing

Parameters

k: keyof X
type: "bigint"
optional
value: bigint
...check: Step<T, unknown>[]

Return Type

Step<T, unknown>
has<
T extends Testing,
X,
>
(
k: keyof X,
type: "symbol",
value?: symbol,
...check: Step<T, unknown>[],
): Step<T, unknown>

Type Parameters

T extends Testing

Parameters

k: keyof X
type: "symbol"
optional
value: symbol
...check: Step<T, unknown>[]

Return Type

Step<T, unknown>
has<
T extends Testing,
X,
>
(
k: keyof X,
type: "string",
value?: string,
...check: Step<T, unknown>[],
): Step<T, unknown>

Type Parameters

T extends Testing

Parameters

k: keyof X
type: "string"
optional
value: string
...check: Step<T, unknown>[]

Return Type

Step<T, unknown>
has<
T extends Testing,
X,
>
(
k: keyof X,
type: "function",
name?: string,
...check: Step<T, unknown>[],
): Step<T, unknown>

Type Parameters

T extends Testing

Parameters

k: keyof X
type: "function"
optional
name: string
...check: Step<T, unknown>[]

Return Type

Step<T, unknown>
has<
T extends Testing,
X,
>
(
k: keyof X,
type: "object",
ctor?: string,
...check: Step<T, unknown>[],
): Step<T, unknown>

Type Parameters

T extends Testing

Parameters

k: keyof X
type: "object"
optional
ctor: string
...check: Step<T, unknown>[]

Return Type

Step<T, unknown>
has<
T extends Testing,
X,
>
(
k: keyof X,
...check: Step<T, unknown>[],
): Step<T, unknown>

Type Parameters

T extends Testing

Parameters

k: keyof X
...check: Step<T, unknown>[]

Return Type

Step<T, unknown>
has<
T extends Testing,
X,
>
(
k: keyof X,
...args: Parameters<has>,
): Step<T, unknown>

Type Parameters

T extends Testing

Parameters

k: keyof X
...args: Parameters<has>

Return Type

Step<T, unknown>
has<
T extends Testing,
X,
>
(props: Partial<X>): Step<T, unknown>

Type Parameters

T extends Testing

Parameters

props: Partial<X>

Return Type

Step<T, unknown>