From 5f8bc4392f16acfdd1e9306bd55f1951e55889f3 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Fri, 23 Oct 2015 22:41:24 +0500 Subject: [PATCH] lodash: signatures of the method _.matches changed --- lodash/lodash-tests.ts | 12 ++++++++++-- lodash/lodash.d.ts | 15 +++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index c083edd4c..6c762fa27 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -3759,13 +3759,21 @@ module TestMatches { { let result: (value: any) => boolean; result = _.matches(source); - result = _(source).matches().value(); } { let result: (value: TResult) => boolean; result = _.matches(source); - result = _(source).matches().value(); + } + + { + let result: _.LoDashImplicitObjectWrapper<(value: TResult) => boolean>; + result = _(source).matches(); + } + + { + let result: _.LoDashExplicitObjectWrapper<(value: TResult) => boolean>; + result = _(source).chain().matches(); } } diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index 881124328..5adfe234e 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -9567,16 +9567,12 @@ declare module _ { * @param source The object of property values to match. * @return Returns the new function. */ - matches( - source: T - ): (value: any) => boolean; + matches(source: T): (value: any) => boolean; /** * @see _.matches */ - matches( - source: T - ): (value: V) => boolean; + matches(source: T): (value: V) => boolean; } interface LoDashImplicitWrapperBase { @@ -9586,6 +9582,13 @@ declare module _ { matches(): LoDashImplicitObjectWrapper<(value: V) => boolean>; } + interface LoDashExplicitWrapperBase { + /** + * @see _.matches + */ + matches(): LoDashExplicitObjectWrapper<(value: V) => boolean>; + } + //_.matchesProperty interface LoDashStatic { /**