space-lift
Version:
TypeScript Array, Object, Map, Set, Union, Enum utils
15 lines (14 loc) • 795 B
TypeScript
/** Returns whether an object is an Array */
export declare const array: (obj: unknown) => obj is Array<unknown>;
/** Returns whether this object is neither null or undefined */
export declare function defined<T>(obj: T): obj is NonNullable<T>;
/** Returns whether this object is a function */
export declare function func(obj: unknown): obj is Function;
/** Returns whether this object is a string */
export declare function string(obj: unknown): obj is string;
/** Returns whether this object is a number */
export declare function number(obj: unknown): obj is number;
/** Returns whether this object is a boolean */
export declare function boolean(obj: unknown): obj is boolean;
/** Returns whether this value is a plain object */
export declare function object(obj: unknown): obj is object;