mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
lodash: signatures of the method _.dropRight changed
This commit is contained in:
+31
-9
@@ -216,15 +216,37 @@ module TestCompact {
|
||||
module TestDropRight {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
let result: TResult[];
|
||||
result = _.dropRight<TResult>(array);
|
||||
result = _.dropRight<TResult>(array, 42);
|
||||
result = _.dropRight<TResult>(list);
|
||||
result = _.dropRight<TResult>(list, 42);
|
||||
result = _(array).dropRight().value();
|
||||
result = _(array).dropRight(42).value();
|
||||
result = _(list).dropRight<TResult>().value();
|
||||
result = _(list).dropRight<TResult>(42).value();
|
||||
|
||||
{
|
||||
let result: TResult[];
|
||||
|
||||
result = _.dropRight<TResult>(array);
|
||||
result = _.dropRight<TResult>(array, 42);
|
||||
|
||||
result = _.dropRight<TResult>(list);
|
||||
result = _.dropRight<TResult>(list, 42);
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).dropRight();
|
||||
result = _(array).dropRight(42);
|
||||
|
||||
result = _(list).dropRight<TResult>();
|
||||
result = _(list).dropRight<TResult>(42);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).chain().dropRight();
|
||||
result = _(array).chain().dropRight(42);
|
||||
|
||||
result = _(list).chain().dropRight<TResult>();
|
||||
result = _(list).chain().dropRight<TResult>(42);
|
||||
}
|
||||
}
|
||||
|
||||
// _.dropRightWhile
|
||||
|
||||
Vendored
+14
@@ -391,6 +391,20 @@ declare module _ {
|
||||
dropRight<TResult>(n?: number): LoDashImplicitArrayWrapper<TResult>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.dropRight
|
||||
*/
|
||||
dropRight(n?: number): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.dropRight
|
||||
*/
|
||||
dropRight<TResult>(n?: number): LoDashExplicitArrayWrapper<TResult>;
|
||||
}
|
||||
|
||||
//_.dropRightWhile
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user