UNPKG

@lylb/tracker

Version:
32 lines (31 loc) 1.79 kB
type Dict = Record<string, any>; export declare const isObject: (obj: unknown) => boolean; export declare const cloneDeep: <T>(obj: T, hash?: WeakMap<WeakKey, any>) => T; export declare const sortByKey: (obj: Dict) => Dict; export declare const mergeArray: <T>(...args: T[][]) => T[]; export declare const uniqueArray: <T>(arr: T[]) => T[]; export declare const objectPrototype: Object; export declare const objectDefineProperty: <T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>) => T; export declare const hasOwnProperty: (v: PropertyKey) => boolean; export declare const objectAssign: { <T extends {}, U>(target: T, source: U): T & U; <T extends {}, U, V>(target: T, source1: U, source2: V): T & U & V; <T extends {}, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; }; export declare const objectString: () => string; export declare const objectKeys: { (o: object): string[]; (o: {}): string[]; }; export declare const jsonToString: { (value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string; (value: any, replacer?: (number | string)[] | null, space?: string | number): string; }; export declare const isFunction: (fn: unknown) => boolean; export declare const isAsyncFunction: (fn: unknown) => boolean; export declare const isPromiseLike: (fn: any) => boolean; export declare const setValueByKeys: (newObj: Dict, keys: string[], value?: any) => void; type Curried<P extends any[], R> = P extends [] ? () => R : P extends [infer A] ? (a: A) => R : P extends [infer A, ...infer B] ? (a: A) => Curried<B, R> : never; export declare const curry: <P extends any[], R>(fn: (...args: any[]) => R) => Curried<P, R>; export {};