Merge pull request #6619 from chrootsu/lodash-rest

lodash: signatures of the method _.rest have been changed
This commit is contained in:
Masahiro Wakame
2015-11-05 23:11:53 +09:00
2 changed files with 72 additions and 12 deletions
+42 -10
View File
@@ -1003,12 +1003,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
@@ -1074,12 +1090,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
@@ -1711,7 +1711,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
@@ -1910,7 +1924,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