UNPKG

deep-equality-data-structures

Version:

Javascript data structures (e.g., Map, Set) that support deep object equality

21 lines (20 loc) 1.25 kB
/** * Require the keys K from T if optional. */ export type Require<T, K extends keyof T> = T & { [P in K]-?: T[P]; }; /** * Format an unknown value to a string for display */ export declare function stringify(value: unknown): string; /** * Chain a list of functions * @returns a function that accepts the args of the first function in the functions list. Each subsequent function is invoked with * the return value of the previous function. */ export declare function chain<TArgs extends any[], T1>(functions: [(...args: TArgs) => T1]): (...args: TArgs) => T1; export declare function chain<TArgs extends any[], T1, T2>(functions: [(...args: TArgs) => T1, (arg: T1) => T2]): (...args: TArgs) => T2; export declare function chain<TArgs extends any[], T1, T2, T3>(functions: [(...args: TArgs) => T1, (arg: T1) => T2, (arg: T2) => T3]): (...args: TArgs) => T3; export declare function chain<TArgs extends any[], T1, T2, T3, T4>(functions: [(...args: TArgs) => T1, (arg: T1) => T2, (arg: T2) => T3, (arg: T3) => T4]): (...args: TArgs) => T4; export declare function chain<TArgs extends any[], T1, T2, T3, T4, T5>(functions: [(...args: TArgs) => T1, (arg: T1) => T2, (arg: T2) => T3, (arg: T3) => T4, (arg: T4) => T5]): (...args: TArgs) => T5;