mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-24 11:29:30 +08:00
lodash: signatures of the method _.findLastIndex have been changed
This commit is contained in:
+47
-25
@@ -462,36 +462,58 @@ module TestFindIndex {
|
||||
module TestFindLastIndex {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
|
||||
let predicateFn: (value: TResult, index?: number, collection?: _.List<TResult>) => boolean;
|
||||
let result: number;
|
||||
|
||||
result = _.findLastIndex<TResult>(array);
|
||||
result = _.findLastIndex<TResult>(array, predicateFn);
|
||||
result = _.findLastIndex<TResult>(array, predicateFn, any);
|
||||
result = _.findLastIndex<TResult>(array, '');
|
||||
result = _.findLastIndex<TResult>(array, '', any);
|
||||
result = _.findLastIndex<{a: number}, TResult>(array, {a: 42});
|
||||
{
|
||||
let result: number;
|
||||
|
||||
result = _.findLastIndex<TResult>(list);
|
||||
result = _.findLastIndex<TResult>(list, predicateFn);
|
||||
result = _.findLastIndex<TResult>(list, predicateFn, any);
|
||||
result = _.findLastIndex<TResult>(list, '');
|
||||
result = _.findLastIndex<TResult>(list, '', any);
|
||||
result = _.findLastIndex<{a: number}, TResult>(list, {a: 42});
|
||||
result = _.findLastIndex<TResult>(array);
|
||||
result = _.findLastIndex<TResult>(array, predicateFn);
|
||||
result = _.findLastIndex<TResult>(array, predicateFn, any);
|
||||
result = _.findLastIndex<TResult>(array, '');
|
||||
result = _.findLastIndex<TResult>(array, '', any);
|
||||
result = _.findLastIndex<{a: number}, TResult>(array, {a: 42});
|
||||
|
||||
result = _<TResult>(array).findLastIndex();
|
||||
result = _<TResult>(array).findLastIndex(predicateFn);
|
||||
result = _<TResult>(array).findLastIndex(predicateFn, any);
|
||||
result = _<TResult>(array).findLastIndex('');
|
||||
result = _<TResult>(array).findLastIndex('', any);
|
||||
result = _<TResult>(array).findLastIndex<{a: number}>({a: 42});
|
||||
result = _.findLastIndex<TResult>(list);
|
||||
result = _.findLastIndex<TResult>(list, predicateFn);
|
||||
result = _.findLastIndex<TResult>(list, predicateFn, any);
|
||||
result = _.findLastIndex<TResult>(list, '');
|
||||
result = _.findLastIndex<TResult>(list, '', any);
|
||||
result = _.findLastIndex<{a: number}, TResult>(list, {a: 42});
|
||||
|
||||
result = _(list).findLastIndex();
|
||||
result = _(list).findLastIndex<TResult>(predicateFn);
|
||||
result = _(list).findLastIndex<TResult>(predicateFn, any);
|
||||
result = _(list).findLastIndex('');
|
||||
result = _(list).findLastIndex('', any);
|
||||
result = _(list).findLastIndex<{a: number}>({a: 42});
|
||||
result = _<TResult>(array).findLastIndex();
|
||||
result = _<TResult>(array).findLastIndex(predicateFn);
|
||||
result = _<TResult>(array).findLastIndex(predicateFn, any);
|
||||
result = _<TResult>(array).findLastIndex('');
|
||||
result = _<TResult>(array).findLastIndex('', any);
|
||||
result = _<TResult>(array).findLastIndex<{a: number}>({a: 42});
|
||||
|
||||
result = _(list).findLastIndex();
|
||||
result = _(list).findLastIndex<TResult>(predicateFn);
|
||||
result = _(list).findLastIndex<TResult>(predicateFn, any);
|
||||
result = _(list).findLastIndex('');
|
||||
result = _(list).findLastIndex('', any);
|
||||
result = _(list).findLastIndex<{a: number}>({a: 42});
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<number>;
|
||||
|
||||
result = _<TResult>(array).chain().findLastIndex();
|
||||
result = _<TResult>(array).chain().findLastIndex(predicateFn);
|
||||
result = _<TResult>(array).chain().findLastIndex(predicateFn, any);
|
||||
result = _<TResult>(array).chain().findLastIndex('');
|
||||
result = _<TResult>(array).chain().findLastIndex('', any);
|
||||
result = _<TResult>(array).chain().findLastIndex<{a: number}>({a: 42});
|
||||
|
||||
result = _(list).chain().findLastIndex();
|
||||
result = _(list).chain().findLastIndex<TResult>(predicateFn);
|
||||
result = _(list).chain().findLastIndex<TResult>(predicateFn, any);
|
||||
result = _(list).chain().findLastIndex('');
|
||||
result = _(list).chain().findLastIndex('', any);
|
||||
result = _(list).chain().findLastIndex<{a: number}>({a: 42});
|
||||
}
|
||||
}
|
||||
|
||||
// _.first
|
||||
|
||||
Vendored
+50
@@ -908,6 +908,56 @@ declare module _ {
|
||||
): number;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.findLastIndex
|
||||
*/
|
||||
findLastIndex(
|
||||
predicate?: ListIterator<T, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<number>;
|
||||
|
||||
/**
|
||||
* @see _.findLastIndex
|
||||
*/
|
||||
findLastIndex(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<number>;
|
||||
|
||||
/**
|
||||
* @see _.findLastIndex
|
||||
*/
|
||||
findLastIndex<W>(
|
||||
predicate?: W
|
||||
): LoDashExplicitWrapper<number>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.findLastIndex
|
||||
*/
|
||||
findLastIndex<TResult>(
|
||||
predicate?: ListIterator<TResult, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<number>;
|
||||
|
||||
/**
|
||||
* @see _.findLastIndex
|
||||
*/
|
||||
findLastIndex(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashExplicitWrapper<number>;
|
||||
|
||||
/**
|
||||
* @see _.findLastIndex
|
||||
*/
|
||||
findLastIndex<W>(
|
||||
predicate?: W
|
||||
): LoDashExplicitWrapper<number>;
|
||||
}
|
||||
|
||||
//_.first
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user