mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-24 11:29:30 +08:00
lodash: signatures of the method _.rest have been changed
This commit is contained in:
+42
-10
@@ -920,12 +920,28 @@ module TestRemove {
|
||||
module TestRest {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
let result: TResult[];
|
||||
|
||||
result = _.rest<TResult>(array);
|
||||
result = _.rest<TResult>(list);
|
||||
result = _(array).rest().value();
|
||||
result = _(list).rest<TResult>().value();
|
||||
{
|
||||
let result: TResult[];
|
||||
|
||||
result = _.rest<TResult>(array);
|
||||
result = _.rest<TResult>(list);
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).rest();
|
||||
result = _(list).rest<TResult>();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).chain().rest();
|
||||
result = _(list).chain().rest<TResult>();
|
||||
}
|
||||
}
|
||||
|
||||
// _.slice
|
||||
@@ -991,12 +1007,28 @@ module TestSortedLastIndex {
|
||||
module TestTail {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
let result: TResult[];
|
||||
|
||||
result = _.tail<TResult>(array);
|
||||
result = _.tail<TResult>(list);
|
||||
result = _(array).tail().value();
|
||||
result = _(list).tail<TResult>().value();
|
||||
{
|
||||
let result: TResult[];
|
||||
|
||||
result = _.tail<TResult>(array);
|
||||
result = _.tail<TResult>(list);
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).tail();
|
||||
result = _(list).tail<TResult>();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).chain().tail();
|
||||
result = _(list).chain().tail<TResult>();
|
||||
}
|
||||
}
|
||||
|
||||
// _.take
|
||||
|
||||
Vendored
+30
-2
@@ -1583,7 +1583,21 @@ declare module _ {
|
||||
/**
|
||||
* @see _.rest
|
||||
*/
|
||||
rest<TResult>(): LoDashImplicitArrayWrapper<TResult>;
|
||||
rest<T>(): LoDashImplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.rest
|
||||
*/
|
||||
rest(): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.rest
|
||||
*/
|
||||
rest<T>(): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
//_.slice
|
||||
@@ -1782,7 +1796,21 @@ declare module _ {
|
||||
/**
|
||||
* @see _.rest
|
||||
*/
|
||||
tail<TResult>(): LoDashImplicitArrayWrapper<TResult>;
|
||||
tail<T>(): LoDashImplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.rest
|
||||
*/
|
||||
tail(): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.rest
|
||||
*/
|
||||
tail<T>(): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
//_.take
|
||||
|
||||
Reference in New Issue
Block a user