From 2e36df31fefbe865f9c457ce525f66c932935d99 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Tue, 12 Jan 2016 00:03:57 +0500 Subject: [PATCH] lodash: signatures of _.merge have been changed --- lodash/lodash-tests.ts | 35 ++++++++++++++++++++++++++++ lodash/lodash.d.ts | 53 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 87 insertions(+), 1 deletion(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 4dfaa33f1..900d6c626 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -8478,6 +8478,41 @@ module TestMerge { { a: [1] }, { a: true }).value(); + { + let result: _.LoDashExplicitObjectWrapper; + + result = _(initialValue).chain().merge(mergingValue); + result = _(initialValue).chain().merge(mergingValue, customizer); + result = _(initialValue).chain().merge(mergingValue, customizer, any); + + result = _(initialValue).chain().merge({}, mergingValue); + result = _(initialValue).chain().merge({}, mergingValue, customizer); + result = _(initialValue).chain().merge({}, mergingValue, customizer, any); + + result = _(initialValue).chain().merge({}, {}, mergingValue); + result = _(initialValue).chain().merge({}, {}, mergingValue, customizer); + result = _(initialValue).chain().merge({}, {}, mergingValue, customizer, any); + + result = _(initialValue).chain().merge({}, {}, {}, mergingValue); + result = _(initialValue).chain().merge({}, {}, {}, mergingValue, customizer); + result = _(initialValue).chain().merge({}, {}, {}, mergingValue, customizer, any); + + result = _(initialValue).chain().merge({}, {}, {}, {}, mergingValue); + result = _(initialValue).chain().merge({}, {}, {}, {}, mergingValue, customizer); + result = _(initialValue).chain().merge({}, {}, {}, {}, mergingValue, customizer, any); + } + + { + let result: _.LoDashExplicitObjectWrapper; + + result = _({ a: 1 }).chain().merge({ b: "string" }, { c: {} }, { d: [1] }, { e: true }); + } + + { + let result: _.LoDashExplicitObjectWrapper; + + result = _({ a: 1 }).chain().merge({ a: "string" }, { a: {} }, { a: [1] }, { a: true }); + } } // _.methods diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 5f0c07777..3a37fc9dd 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -13018,7 +13018,7 @@ declare module _ { source4: TSource4, customizer?: MergeCustomizer, thisArg?: any - ): TObject & TSource1 & TSource2 & TSource3 & TSource4; + ): TObject & TSource1 & TSource2 & TSource3 & TSource4; /** * @see _.merge @@ -13080,6 +13080,57 @@ declare module _ { ): LoDashImplicitObjectWrapper; } + interface LoDashExplicitObjectWrapper { + /** + * @see _.merge + */ + merge( + source: TSource, + customizer?: MergeCustomizer, + thisArg?: any + ): LoDashExplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2, + customizer?: MergeCustomizer, + thisArg?: any + ): LoDashExplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2, + source3: TSource3, + customizer?: MergeCustomizer, + thisArg?: any + ): LoDashExplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + source1: TSource1, + source2: TSource2, + source3: TSource3, + source4: TSource4, + customizer?: MergeCustomizer, + thisArg?: any + ): LoDashExplicitObjectWrapper; + + /** + * @see _.merge + */ + merge( + ...otherArgs: any[] + ): LoDashExplicitObjectWrapper; + } + //_.methods interface LoDashStatic { /**