mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-10 11:40:16 +08:00
lodash: signatures of the method _.dropWhile changed
This commit is contained in:
+50
-25
@@ -268,35 +268,60 @@ module TestDropWhile {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
let predicateFn: (value: TResult, index: number, collection: _.List<TResult>) => boolean;
|
||||
let result: TResult[];
|
||||
|
||||
result = _.dropWhile<TResult>(array);
|
||||
result = _.dropWhile<TResult>(array, predicateFn);
|
||||
result = _.dropWhile<TResult>(array, predicateFn, any);
|
||||
result = _.dropWhile<TResult>(array, '');
|
||||
result = _.dropWhile<TResult>(array, '', any);
|
||||
result = _.dropWhile<{a: number;}, TResult>(array, {a: 42});
|
||||
{
|
||||
let result: TResult[];
|
||||
|
||||
result = _.dropWhile<TResult>(list);
|
||||
result = _.dropWhile<TResult>(list, predicateFn);
|
||||
result = _.dropWhile<TResult>(list, predicateFn, any);
|
||||
result = _.dropWhile<TResult>(list, '');
|
||||
result = _.dropWhile<TResult>(list, '', any);
|
||||
result = _.dropWhile<{a: number;}, TResult>(list, {a: 42});
|
||||
result = _.dropWhile<TResult>(array);
|
||||
result = _.dropWhile<TResult>(array, predicateFn);
|
||||
result = _.dropWhile<TResult>(array, predicateFn, any);
|
||||
result = _.dropWhile<TResult>(array, '');
|
||||
result = _.dropWhile<TResult>(array, '', any);
|
||||
result = _.dropWhile<{a: number;}, TResult>(array, {a: 42});
|
||||
|
||||
result = _(array).dropWhile().value();
|
||||
result = _(array).dropWhile(predicateFn).value();
|
||||
result = _(array).dropWhile(predicateFn, any).value();
|
||||
result = _(array).dropWhile('').value();
|
||||
result = _(array).dropWhile('', any).value();
|
||||
result = _(array).dropWhile<{a: number;}>({a: 42}).value();
|
||||
result = _.dropWhile<TResult>(list);
|
||||
result = _.dropWhile<TResult>(list, predicateFn);
|
||||
result = _.dropWhile<TResult>(list, predicateFn, any);
|
||||
result = _.dropWhile<TResult>(list, '');
|
||||
result = _.dropWhile<TResult>(list, '', any);
|
||||
result = _.dropWhile<{a: number;}, TResult>(list, {a: 42});
|
||||
}
|
||||
|
||||
result = _(list).dropWhile<TResult>().value();
|
||||
result = _(list).dropWhile<TResult>(predicateFn).value();
|
||||
result = _(list).dropWhile<TResult>(predicateFn, any).value();
|
||||
result = _(list).dropWhile<TResult>('').value();
|
||||
result = _(list).dropWhile<TResult>('', any).value();
|
||||
result = _(list).dropWhile<{a: number;}, TResult>({a: 42}).value();
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).dropWhile();
|
||||
result = _(array).dropWhile(predicateFn);
|
||||
result = _(array).dropWhile(predicateFn, any);
|
||||
result = _(array).dropWhile('');
|
||||
result = _(array).dropWhile('', any);
|
||||
result = _(array).dropWhile<{a: number;}>({a: 42});
|
||||
|
||||
result = _(list).dropWhile<TResult>();
|
||||
result = _(list).dropWhile<TResult>(predicateFn);
|
||||
result = _(list).dropWhile<TResult>(predicateFn, any);
|
||||
result = _(list).dropWhile<TResult>('');
|
||||
result = _(list).dropWhile<TResult>('', any);
|
||||
result = _(list).dropWhile<{a: number;}, TResult>({a: 42});
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).chain().dropWhile();
|
||||
result = _(array).chain().dropWhile(predicateFn);
|
||||
result = _(array).chain().dropWhile(predicateFn, any);
|
||||
result = _(array).chain().dropWhile('');
|
||||
result = _(array).chain().dropWhile('', any);
|
||||
result = _(array).chain().dropWhile<{a: number;}>({a: 42});
|
||||
|
||||
result = _(list).chain().dropWhile<TResult>();
|
||||
result = _(list).chain().dropWhile<TResult>(predicateFn);
|
||||
result = _(list).chain().dropWhile<TResult>(predicateFn, any);
|
||||
result = _(list).chain().dropWhile<TResult>('');
|
||||
result = _(list).chain().dropWhile<TResult>('', any);
|
||||
result = _(list).chain().dropWhile<{a: number;}, TResult>({a: 42});
|
||||
}
|
||||
}
|
||||
|
||||
// _.fill
|
||||
|
||||
Vendored
+50
@@ -579,6 +579,56 @@ declare module _ {
|
||||
): LoDashImplicitArrayWrapper<TValue>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile(
|
||||
predicate?: ListIterator<T, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashExplicitArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashExplicitArrayWrapper<T>;
|
||||
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile<TWhere>(
|
||||
predicate?: TWhere
|
||||
): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile<TValue>(
|
||||
predicate?: ListIterator<TValue, boolean>,
|
||||
thisArg?: any
|
||||
): LoDashExplicitArrayWrapper<TValue>;
|
||||
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile<TValue>(
|
||||
predicate?: string,
|
||||
thisArg?: any
|
||||
): LoDashExplicitArrayWrapper<TValue>;
|
||||
|
||||
/**
|
||||
* @see _.dropWhile
|
||||
*/
|
||||
dropWhile<TWhere, TValue>(
|
||||
predicate?: TWhere
|
||||
): LoDashExplicitArrayWrapper<TValue>;
|
||||
}
|
||||
|
||||
//_.findIndex
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user