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 { /**