From 106a8f8ae685e6c41fe426ffa87266b1ba01143b Mon Sep 17 00:00:00 2001 From: Brian Zengel Date: Sun, 10 Nov 2013 19:32:26 -0500 Subject: [PATCH] Add defintions for _(...).functions, _(...).methods --- lodash/lodash-tests.ts | 3 +++ lodash/lodash.d.ts | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index fc8f8a527..e35b59d7e 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -708,6 +708,9 @@ result = _.forOwnRight({ '0': 'zero', '1': 'one', 'length': 2 }, function(n result = _.functions(_); result = _.methods(_); + result = <_.LoDashArrayWrapper>_(_).functions(); + result = <_.LoDashArrayWrapper>_(_).methods(); + result = _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); result = _.invert({ 'first': 'moe', 'second': 'larry' }); diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index a87952679..67f915345 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -3347,6 +3347,18 @@ declare module _ { methods(object: any): string[]; } + interface LoDashObjectWrapper { + /** + * @see _.functions + **/ + functions(): _.LoDashArrayWrapper + + /** + * @see _.functions + **/ + methods(): _.LoDashArrayWrapper + } + //_.has interface LoDashStatic { /**