index.d.ts 823 B

1234567891011121314151617181920
  1. declare function deepmerge<T>(x: Partial<T>, y: Partial<T>, options?: deepmerge.Options): T;
  2. declare function deepmerge<T1, T2>(x: Partial<T1>, y: Partial<T2>, options?: deepmerge.Options): T1 & T2;
  3. declare namespace deepmerge {
  4. export interface Options {
  5. arrayMerge?(target: any[], source: any[], options?: ArrayMergeOptions): any[];
  6. clone?: boolean;
  7. customMerge?: (key: string, options?: Options) => ((x: any, y: any) => any) | undefined;
  8. isMergeableObject?(value: object): boolean;
  9. }
  10. export interface ArrayMergeOptions {
  11. isMergeableObject(value: object): boolean;
  12. cloneUnlessOtherwiseSpecified(value: object, options?: Options): object;
  13. }
  14. export function all (objects: object[], options?: Options): object;
  15. export function all<T> (objects: Partial<T>[], options?: Options): T;
  16. }
  17. export = deepmerge;