Skip to content

GuardedType<TTypeGuard>

The type a TypeGuard narrows to. Distributes over a union of guards.

Import:

import type { GuardedType } from '@mnaoumov/typescript-lib/type-guards';

Signature:

export type GuardedType<TTypeGuard>

Signature:

type GuardedType<TTypeGuard> = TTypeGuard extends (value: unknown) => value is infer T ? T : never

Type: TTypeGuard extends (value: unknown) => value is infer T ? T : never


Links to this page: