lodash: signatures of the method _.rest have been changed

This commit is contained in:
Ilya Mochalov
2015-11-05 08:40:18 +05:00
parent 001ca36ba5
commit 1b89ccce22
2 changed files with 72 additions and 12 deletions
+42 -10
View File
@@ -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
+30 -2
View File
@@ -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