mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
Merge pull request #6963 from chrootsu/lodash-findLastKey
lodash: signatures of _.findLastKey have been changed
This commit is contained in:
+26
-2
@@ -6184,10 +6184,9 @@ module TestFindKey {
|
||||
|
||||
// _.findLastKey
|
||||
module TestFindLastKey {
|
||||
let result: string;
|
||||
|
||||
{
|
||||
let predicateFn: (value: any, key?: string, object?: {}) => boolean;
|
||||
let result: string;
|
||||
|
||||
result = _.findLastKey<{a: string;}>({a: ''});
|
||||
|
||||
@@ -6214,6 +6213,7 @@ module TestFindLastKey {
|
||||
|
||||
{
|
||||
let predicateFn: (value: string, key?: string, collection?: _.Dictionary<string>) => boolean;
|
||||
let result: string;
|
||||
|
||||
result = _.findLastKey<string, {a: string;}>({a: ''}, predicateFn);
|
||||
result = _.findLastKey<string, {a: string;}>({a: ''}, predicateFn, any);
|
||||
@@ -6221,6 +6221,30 @@ module TestFindLastKey {
|
||||
result = _<{a: string;}>({a: ''}).findLastKey<string>(predicateFn);
|
||||
result = _<{a: string;}>({a: ''}).findLastKey<string>(predicateFn, any);
|
||||
}
|
||||
|
||||
{
|
||||
let predicateFn: (value: any, key?: string, object?: {}) => boolean;
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _<{a: string;}>({a: ''}).chain().findLastKey();
|
||||
|
||||
result = _<{a: string;}>({a: ''}).chain().findLastKey(predicateFn);
|
||||
result = _<{a: string;}>({a: ''}).chain().findLastKey(predicateFn, any);
|
||||
|
||||
|
||||
result = _<{a: string;}>({a: ''}).chain().findLastKey('');
|
||||
result = _<{a: string;}>({a: ''}).chain().findLastKey('', any);
|
||||
|
||||
result = _<{a: string;}>({a: ''}).chain().findLastKey<{a: number;}>({a: 42});
|
||||
}
|
||||
|
||||
{
|
||||
let predicateFn: (value: string, key?: string, collection?: _.Dictionary<string>) => boolean;
|
||||
let result: _.LoDashExplicitWrapper<string>;
|
||||
|
||||
result = _<{a: string;}>({a: ''}).chain().findLastKey<string>(predicateFn);
|
||||
result = _<{a: string;}>({a: ''}).chain().findLastKey<string>(predicateFn, any);
|
||||
}
|
||||
}
|
||||
|
||||
// _.forIn
|
||||
|
||||
Vendored
+33
@@ -10620,6 +10620,39 @@ declare module _ {
|
||||
): string;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.findLastKey
|
||||
*/
|
||||
findLastKey<TValues>(
|
||||
predicate?: DictionaryIterator<TValues, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<string>;
|
||||
|
||||
/**
|
||||
* @see _.findLastKey
|
||||
*/
|
||||
findLastKey(
|
||||
predicate?: ObjectIterator<any, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<string>;
|
||||
|
||||
/**
|
||||
* @see _.findLastKey
|
||||
*/
|
||||
findLastKey(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<string>;
|
||||
|
||||
/**
|
||||
* @see _.findLastKey
|
||||
*/
|
||||
findLastKey<TWhere extends Dictionary<any>>(
|
||||
predicate?: TWhere
|
||||
): LoDashExplicitWrapper<string>;
|
||||
}
|
||||
|
||||
//_.forIn
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user