Logo Xantham

TsTypePredicate Type

Represents a type predicate or assertion signature like `x is Foo` or `asserts x is Foo`. Reflects: `TypePredicateNode` and `TypePredicate`. Example (TS): ```ts function isNum(x: unknown): x is number { return typeof x === 'number' } function assertIsNum(x: unknown): asserts x is number { if (typeof x !== 'number') throw new Error() } ```

Record fields

Record Field Description

IsAssertion

Full Usage: IsAssertion

Field type: bool
Field type: bool

ParameterName

Full Usage: ParameterName

Field type: string
Field type: string

Type

Full Usage: Type

Field type: TypeKey
Field type: TypeKey

Type something to start searching.