lodash: signatures of the method _.matchesProperty have been changed

This commit is contained in:
Ilya Mochalov
2015-11-02 04:21:58 +05:00
parent eb59a40d3c
commit dd9a1df4c2
2 changed files with 42 additions and 2 deletions
+26 -2
View File
@@ -4246,14 +4246,38 @@ module TestMatches {
{
let result: (value: any) => boolean;
result = _.matchesProperty<TResult>(path, source);
result = _(path).matchesProperty<TResult>(source).value();
}
{
let result: (value: TResult) => boolean;
result = _.matchesProperty<TResult, TResult>(path, source);
result = _(path).matchesProperty<TResult, TResult>(source).value();
}
{
let result: _.LoDashImplicitObjectWrapper<(value: any) => boolean>;
result = _(path).matchesProperty<TResult>(source);
}
{
let result: _.LoDashImplicitObjectWrapper<(value: TResult) => boolean>;
result = _(path).matchesProperty<TResult, TResult>(source);
}
{
let result: _.LoDashExplicitObjectWrapper<(value: any) => boolean>;
result = _(path).chain().matchesProperty<TResult>(source);
}
{
let result: _.LoDashExplicitObjectWrapper<(value: TResult) => boolean>;
result = _(path).chain().matchesProperty<TResult, TResult>(source);
}
}
+16
View File
@@ -9980,6 +9980,22 @@ declare module _ {
): LoDashImplicitObjectWrapper<(value: Value) => boolean>;
}
interface LoDashExplicitWrapperBase<T, TWrapper> {
/**
* @see _.matchesProperty
*/
matchesProperty<SrcValue>(
srcValue: SrcValue
): LoDashExplicitObjectWrapper<(value: any) => boolean>;
/**
* @see _.matchesProperty
*/
matchesProperty<SrcValue, Value>(
srcValue: SrcValue
): LoDashExplicitObjectWrapper<(value: Value) => boolean>;
}
//_.method
interface LoDashStatic {
/**