lodash: signatures of the method _.matches changed

This commit is contained in:
Ilya Mochalov
2015-10-23 22:41:24 +05:00
parent 3191f6e008
commit 5f8bc4392f
2 changed files with 19 additions and 8 deletions
+10 -2
View File
@@ -3759,13 +3759,21 @@ module TestMatches {
{
let result: (value: any) => boolean;
result = _.matches<TResult>(source);
result = _(source).matches().value();
}
{
let result: (value: TResult) => boolean;
result = _.matches<TResult, TResult>(source);
result = _(source).matches<TResult>().value();
}
{
let result: _.LoDashImplicitObjectWrapper<(value: TResult) => boolean>;
result = _(source).matches<TResult>();
}
{
let result: _.LoDashExplicitObjectWrapper<(value: TResult) => boolean>;
result = _(source).chain().matches<TResult>();
}
}
+9 -6
View File
@@ -9567,16 +9567,12 @@ declare module _ {
* @param source The object of property values to match.
* @return Returns the new function.
*/
matches<T>(
source: T
): (value: any) => boolean;
matches<T>(source: T): (value: any) => boolean;
/**
* @see _.matches
*/
matches<T, V>(
source: T
): (value: V) => boolean;
matches<T, V>(source: T): (value: V) => boolean;
}
interface LoDashImplicitWrapperBase<T, TWrapper> {
@@ -9586,6 +9582,13 @@ declare module _ {
matches<V>(): LoDashImplicitObjectWrapper<(value: V) => boolean>;
}
interface LoDashExplicitWrapperBase<T, TWrapper> {
/**
* @see _.matches
*/
matches<V>(): LoDashExplicitObjectWrapper<(value: V) => boolean>;
}
//_.matchesProperty
interface LoDashStatic {
/**