Skip to content

Type Alias: ExtractErr<T>

ExtractErr<T> = Extract<T, Err>

Defined in: index.ts:112

Extracts only the Err types from a union type.

Type Parameters

T

T

The type to extract Err types from

Example

typescript
type T1 = ExtractErr<Ok<'x'> | Err<1> | Err<true> | []>; // Err<1> | Err<true>