From eb5d102c53dd046694b34a64e9fc1ffaa8a3797c Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Wed, 25 Nov 2015 04:47:56 +0500 Subject: [PATCH] lodash: signatures of _.flattenDeep have been changed --- lodash/lodash-tests.ts | 34 ++++++++++++++++++++++++++++------ lodash/lodash.d.ts | 18 ++++++++++++++++-- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 30c0b9934..731d12c6d 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -615,18 +615,40 @@ module TestFlattenDeep { result = _.flattenDeep(recursiveArray); result = _.flattenDeep(listOfMaybeRecursiveArraysOrValues); - - result = _(recursiveArray).flattenDeep().value(); - - result = _(listOfMaybeRecursiveArraysOrValues).flattenDeep().value(); } { - let result: any; + let result: any[]; result = _.flattenDeep(recursiveList); + } - result = _(recursiveList).flattenDeep().value(); + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(recursiveArray).flattenDeep(); + + result = _(listOfMaybeRecursiveArraysOrValues).flattenDeep(); + } + + { + let result: _.LoDashImplicitArrayWrapper; + + result = _(recursiveList).flattenDeep(); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(recursiveArray).chain().flattenDeep(); + + result = _(listOfMaybeRecursiveArraysOrValues).chain().flattenDeep(); + } + + { + let result: _.LoDashExplicitArrayWrapper; + + result = _(recursiveList).chain().flattenDeep(); } } diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 73a783b64..dd347d9d1 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -1131,14 +1131,28 @@ declare module _ { /** * @see _.flattenDeep */ - flattenDeep(): LoDashImplicitArrayWrapper; + flattenDeep(): LoDashImplicitArrayWrapper; } interface LoDashImplicitObjectWrapper { /** * @see _.flattenDeep */ - flattenDeep(): LoDashImplicitArrayWrapper; + flattenDeep(): LoDashImplicitArrayWrapper; + } + + interface LoDashExplicitArrayWrapper { + /** + * @see _.flattenDeep + */ + flattenDeep(): LoDashExplicitArrayWrapper; + } + + interface LoDashExplicitObjectWrapper { + /** + * @see _.flattenDeep + */ + flattenDeep(): LoDashExplicitArrayWrapper; } //_.head