UNPKG

1.94 kBTypeScriptView Raw
1export declare const EMPTY_ARRAY: ReadonlyArray<any>;
2export declare const EMPTY_OBJECT: {};
3export declare type IDisposer = () => void;
4export declare function fail(message?: string): never;
5export declare function identity<T>(_: T): T;
6export declare function nothing(): null;
7export declare function noop(): void;
8export declare function isArray(val: any): boolean;
9export declare function asArray<T>(val: undefined | null | T | T[]): T[];
10export declare function extend<A, B>(a: A, b: B): A & B;
11export declare function extend<A, B, C>(a: A, b: B, c: C): A & B & C;
12export declare function extend<A, B, C, D>(a: A, b: B, c: C, d: D): A & B & C & D;
13export declare function extend(a: any, ...b: any[]): any;
14export declare function extendKeepGetter<A, B>(a: A, b: B): A & B;
15export declare function extendKeepGetter<A, B, C>(a: A, b: B, c: C): A & B & C;
16export declare function extendKeepGetter<A, B, C, D>(a: A, b: B, c: C, d: D): A & B & C & D;
17export declare function extendKeepGetter(a: any, ...b: any[]): any;
18export declare function isPlainObject(value: any): boolean;
19export declare function isMutable(value: any): boolean;
20export declare function isPrimitive(value: any): boolean;
21export declare function freeze<T>(value: T): T;
22export declare function deepFreeze<T>(value: T): T;
23export declare function isSerializable(value: any): boolean;
24export declare function addHiddenFinalProp(object: any, propName: string, value: any): void;
25export declare function addHiddenWritableProp(object: any, propName: string, value: any): void;
26export declare function addReadOnlyProp(object: any, propName: string, value: any): void;
27export declare function remove<T>(collection: T[], item: T): void;
28export declare function registerEventHandler(handlers: Function[], handler: Function): IDisposer;
29export declare function hasOwnProperty(object: Object, propName: string): any;
30export declare function argsToArray(args: IArguments): any[];