nullish-utils
Version:
A package to offer nullish, common, operator, functions
13 lines (12 loc) • 817 B
TypeScript
export declare const NIL_VALUES: readonly (null | undefined)[];
export type Nillable<T> = T | null | undefined;
export declare const isNull: <T = any>(object?: Nillable<T>) => object is null;
export declare const isUndefined: <T = any>(object?: Nillable<T>) => object is undefined;
export declare const isNil: <T = any>(object?: Nillable<T>) => object is undefined | null;
export declare const isNotNil: <T = any>(object?: Nillable<T>) => object is T;
export declare const isAnyNil: (...args: any[]) => boolean;
export declare const isAnyNonNil: (...args: any[]) => boolean;
export declare const areAllNil: (...args: any[]) => boolean;
export declare const areAllNonNil: (...args: any[]) => boolean;
export declare const coalescing: (...args: any[]) => any;
export declare const firstNonNil: (...args: any[]) => any;