1 | /**
|
2 | * If the type is possibly null or undefined.
|
3 | */
|
4 | export declare type IsNullable<T> = T extends null | undefined ? true : never;
|
5 | /**
|
6 | * If the type is not possibly null or undefined.
|
7 | */
|
8 | export declare type IsNonNullable<T> = IsNever<IsNullable<T>>;
|
9 | /**
|
10 | * If the type has the specified type.
|
11 | */
|
12 | export declare type HasType<T, U> = T extends U ? true : never;
|
13 | /**
|
14 | * If the type does not have the specified type.
|
15 | */
|
16 | export declare type NotHasType<T, U> = IsNever<HasType<T, U>>;
|
17 | /**
|
18 | * If the type is the never type.
|
19 | */
|
20 | export declare type IsNever<T> = HasType<T, never>;
|
21 | /**
|
22 | * If the type is the exact type.
|
23 | * @remarks This is useful for checking if two union types match exactly.
|
24 | */
|
25 | export declare type IsExactType<T, U> = Exclude<T, U> extends never ? Exclude<U, T> extends never ? true : never : never;
|