UNPKG

type-plus

Version:
27 lines 949 B
import type { IsEqual } from '../equal/equal.js'; /** * Is the subject of type T */ export declare function isType<T>(subject: T): subject is T; /** * Is the subject of type T, satisfying the supplied validator */ export declare function isType<T>(subject: unknown, validator: (s: T) => unknown): subject is T; export declare namespace isType { var t: <T extends true>(subject?: T | undefined) => boolean; var f: <T extends false>(subject?: T | undefined) => boolean; var never: typeof isNever; var equal: <_C extends IsEqual<A, B>, A, B>() => void; } /** * Check is the type `never` * @deprecated use `isType<T>()` or `testType.never<T>()` instead */ declare function isNever<S extends never>(): unknown; /** * Check is the value is type `never` * @deprecated use `isType<T>()` or `testType.never<T>()` instead */ declare function isNever(subject: never): subject is never; export {}; //# sourceMappingURL=is_type.d.ts.map