From dd9a1df4c21bf5bf56d65e568fa38d31df5820c3 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Mon, 2 Nov 2015 04:21:58 +0500 Subject: [PATCH] lodash: signatures of the method _.matchesProperty have been changed --- lodash/lodash-tests.ts | 28 ++++++++++++++++++++++++++-- lodash/lodash.d.ts | 16 ++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 3afc49041..6b604f23d 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -4246,14 +4246,38 @@ module TestMatches { { let result: (value: any) => boolean; + result = _.matchesProperty(path, source); - result = _(path).matchesProperty(source).value(); } { let result: (value: TResult) => boolean; + result = _.matchesProperty(path, source); - result = _(path).matchesProperty(source).value(); + } + + { + let result: _.LoDashImplicitObjectWrapper<(value: any) => boolean>; + + result = _(path).matchesProperty(source); + } + + { + let result: _.LoDashImplicitObjectWrapper<(value: TResult) => boolean>; + + result = _(path).matchesProperty(source); + } + + { + let result: _.LoDashExplicitObjectWrapper<(value: any) => boolean>; + + result = _(path).chain().matchesProperty(source); + } + + { + let result: _.LoDashExplicitObjectWrapper<(value: TResult) => boolean>; + + result = _(path).chain().matchesProperty(source); } } diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index d143f4e65..069e083e9 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -9980,6 +9980,22 @@ declare module _ { ): LoDashImplicitObjectWrapper<(value: Value) => boolean>; } + interface LoDashExplicitWrapperBase { + /** + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashExplicitObjectWrapper<(value: any) => boolean>; + + /** + * @see _.matchesProperty + */ + matchesProperty( + srcValue: SrcValue + ): LoDashExplicitObjectWrapper<(value: Value) => boolean>; + } + //_.method interface LoDashStatic { /**