mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
lodash: signatures of the method _.lastIndexOf changed
This commit is contained in:
+28
-13
@@ -506,23 +506,38 @@ module TestLastIndexOf {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
let value: TResult;
|
||||
let result: number;
|
||||
|
||||
result = _.lastIndexOf<TResult>(array, value);
|
||||
result = _.lastIndexOf<TResult>(array, value, true);
|
||||
result = _.lastIndexOf<TResult>(array, value, 42);
|
||||
{
|
||||
let result: number;
|
||||
|
||||
result = _.lastIndexOf<TResult>(list, value);
|
||||
result = _.lastIndexOf<TResult>(list, value, true);
|
||||
result = _.lastIndexOf<TResult>(list, value, 42);
|
||||
result = _.lastIndexOf<TResult>(array, value);
|
||||
result = _.lastIndexOf<TResult>(array, value, true);
|
||||
result = _.lastIndexOf<TResult>(array, value, 42);
|
||||
|
||||
result = _(array).lastIndexOf(value);
|
||||
result = _(array).lastIndexOf(value, true);
|
||||
result = _(array).lastIndexOf(value, 42);
|
||||
result = _.lastIndexOf<TResult>(list, value);
|
||||
result = _.lastIndexOf<TResult>(list, value, true);
|
||||
result = _.lastIndexOf<TResult>(list, value, 42);
|
||||
|
||||
result = _(list).lastIndexOf<TResult>(value);
|
||||
result = _(list).lastIndexOf<TResult>(value, true);
|
||||
result = _(list).lastIndexOf<TResult>(value, 42);
|
||||
result = _(array).lastIndexOf(value);
|
||||
result = _(array).lastIndexOf(value, true);
|
||||
result = _(array).lastIndexOf(value, 42);
|
||||
|
||||
result = _(list).lastIndexOf<TResult>(value);
|
||||
result = _(list).lastIndexOf<TResult>(value, true);
|
||||
result = _(list).lastIndexOf<TResult>(value, 42);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitWrapper<number>;
|
||||
|
||||
result = _(array).chain().lastIndexOf(value);
|
||||
result = _(array).chain().lastIndexOf(value, true);
|
||||
result = _(array).chain().lastIndexOf(value, 42);
|
||||
|
||||
result = _(list).chain().lastIndexOf<TResult>(value);
|
||||
result = _(list).chain().lastIndexOf<TResult>(value, true);
|
||||
result = _(list).chain().lastIndexOf<TResult>(value, 42);
|
||||
}
|
||||
}
|
||||
|
||||
// _.object
|
||||
|
||||
Vendored
+20
@@ -1045,6 +1045,26 @@ declare module _ {
|
||||
): number;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.lastIndexOf
|
||||
*/
|
||||
lastIndexOf(
|
||||
value: T,
|
||||
fromIndex?: boolean|number
|
||||
): LoDashExplicitWrapper<number>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.lastIndexOf
|
||||
*/
|
||||
lastIndexOf<TResult>(
|
||||
value: TResult,
|
||||
fromIndex?: boolean|number
|
||||
): LoDashExplicitWrapper<number>;
|
||||
}
|
||||
|
||||
//_.object
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user