From 1680659788ec6494095f62aa304521a8627771c3 Mon Sep 17 00:00:00 2001 From: Brian Zengel Date: Mon, 21 Oct 2013 10:39:34 -0400 Subject: [PATCH] added _(...).flatten defs --- lodash/lodash-tests.ts | 4 ++++ lodash/lodash.d.ts | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 97738b58f..e4ac60e3a 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -188,6 +188,10 @@ result = _.flatten([1, [2], [3, [[4]]]]); result = _.flatten([1, [2], [3, [[4]]]], true); result = _.flatten(stoogesQuotes, 'quotes'); + result = _([1, [2], [3, [[4]]]]).flatten(); + result = _([1, [2], [3, [[4]]]]).flatten(true); + result = _(stoogesQuotes).flatten('quotes'); + result = _.indexOf([1, 2, 3, 1, 2, 3], 2); result = _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); result = _.indexOf([1, 1, 2, 2, 3, 3], 2, true); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 43be6684f..3ea253d6f 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -495,6 +495,13 @@ declare module _ { callback?: ListIterator, thisArg?: any): any[]; + interface LoDashWrapper { + flatten( + isShallow?, + callback?: ListIterator, + thisArg?: any): any[]; + } + /** * @see _.first **/