diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index dea01282f..dfca08752 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -4791,14 +4791,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 fe48f4982..3397d8219 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -10490,6 +10490,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 { /**