diff --git a/index.d.ts b/index.d.ts index 7412fcf..86dfede 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2,10 +2,13 @@ declare function deepmerge(x: Partial, y: Partial, options?: deepmerge. declare function deepmerge(x: Partial, y: Partial, options?: deepmerge.Options): T1 & T2; declare namespace deepmerge { + export type CustomOptions = Required & { + cloneUnlessOtherwiseSpecified: (item: any, options: CustomOptions) => any + } export interface Options { - arrayMerge?(target: any[], source: any[], options?: Options): any[]; + arrayMerge?(target: any[], source: any[], options: CustomOptions): any[]; clone?: boolean; - customMerge?: (key: string, options?: Options) => ((x: any, y: any) => any) | undefined; + customMerge?: (key: string, options: CustomOptions) => ((x: any, y: any) => any) | undefined; isMergeableObject?(value: object): boolean; }