UNPKG

ts-guards

Version:
14 lines (13 loc) 673 B
/** * Data and Structure types * See also: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures */ export declare function isNull(x: unknown): x is null; export declare function isUndefined(x: unknown): x is undefined; export declare function isBoolean(x: unknown): x is boolean; export declare function isNumber(x: unknown): x is number; export declare function isString(x: unknown): x is string; export declare function isBigInt(x: unknown): x is bigint; export declare function isSymbol(x: unknown): x is symbol; export declare function isNotNullOrUndefined<T>(x: T): x is NonNullable<T>; export declare function isObject(x: unknown): x is object;