From 7b56be3bc250d842ad7db5d5bbc7111702ebe496 Mon Sep 17 00:00:00 2001 From: Brian Zengel Date: Sun, 10 Nov 2013 18:47:32 -0500 Subject: [PATCH] Added _(...).forInRight definitions --- lodash/lodash-tests.ts | 4 ++++ lodash/lodash.d.ts | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index b104a69da..12078ca9e 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -685,6 +685,10 @@ result = _.forInRight(new Dog('Dagny'), function(value, key) { console.log(key); }); + result = <_.LoDashObjectWrapper>_(new Dog('Dagny')).forInRight(function(value, key) { + console.log(key); + }); + result = _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { console.log(key); }); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 9ba7da043..c3084a3e6 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -3271,6 +3271,15 @@ declare module _ { thisArg?: any): Dictionary; } + interface LoDashObjectWrapper { + /** + * @see _.forInRight + **/ + forInRight( + callback?: ObjectIterator, + thisArg?: any): Dictionary; + } + //_.forOwn interface LoDashStatic { /**