mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #6409 from chrootsu/lodash-matches
lodash: signatures of the method _.matches changed
This commit is contained in:
+10
-2
@@ -4058,13 +4058,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>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+9
-6
@@ -9682,16 +9682,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> {
|
||||
@@ -9701,6 +9697,13 @@ declare module _ {
|
||||
matches<V>(): LoDashImplicitObjectWrapper<(value: V) => boolean>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitWrapperBase<T, TWrapper> {
|
||||
/**
|
||||
* @see _.matches
|
||||
*/
|
||||
matches<V>(): LoDashExplicitObjectWrapper<(value: V) => boolean>;
|
||||
}
|
||||
|
||||
//_.matchesProperty
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user