mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-24 22:17:06 +08:00
(feature) Renamed _.rest to _.tail
This commit is contained in:
@@ -1283,31 +1283,31 @@ module TestRemove {
|
||||
}
|
||||
}
|
||||
|
||||
// _.rest
|
||||
module TestRest {
|
||||
// _.tail
|
||||
module TestTail {
|
||||
let array: TResult[];
|
||||
let list: _.List<TResult>;
|
||||
|
||||
{
|
||||
let result: TResult[];
|
||||
|
||||
result = _.rest<TResult>(array);
|
||||
result = _.rest<TResult>(list);
|
||||
result = _.tail<TResult>(array);
|
||||
result = _.tail<TResult>(list);
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).rest();
|
||||
result = _(list).rest<TResult>();
|
||||
result = _(array).tail();
|
||||
result = _(list).tail<TResult>();
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(array).chain().rest();
|
||||
result = _(list).chain().rest<TResult>();
|
||||
result = _(array).chain().tail();
|
||||
result = _(list).chain().tail<TResult>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
22
lodash/lodash.d.ts
vendored
22
lodash/lodash.d.ts
vendored
@@ -22,7 +22,7 @@ TODO:
|
||||
- [x] Renamed _.overArgs to _.overArgs
|
||||
- [x] Renamed _.padLeft & _.padRight to _.padStart & _.padEnd
|
||||
- [x] Renamed _.pairs to _.toPairs
|
||||
- [ ] Renamed _.rest to _.tail
|
||||
- [x] Renamed _.rest to _.tail
|
||||
- [ ] Renamed _.restParam to _.rest
|
||||
- [ ] Renamed _.sortByOrder to _.orderBy
|
||||
- [ ] Renamed _.trimLeft & _.trimRight to _.trimStart & _.trimEnd
|
||||
@@ -1977,7 +1977,7 @@ declare module _ {
|
||||
): LoDashExplicitArrayWrapper<TResult>;
|
||||
}
|
||||
|
||||
//_.rest
|
||||
//_.tail
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Gets all but the first element of array.
|
||||
@@ -1987,35 +1987,35 @@ declare module _ {
|
||||
* @param array The array to query.
|
||||
* @return Returns the slice of array.
|
||||
*/
|
||||
rest<T>(array: List<T>): T[];
|
||||
tail<T>(array: List<T>): T[];
|
||||
}
|
||||
|
||||
interface LoDashImplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.rest
|
||||
* @see _.tail
|
||||
*/
|
||||
rest(): LoDashImplicitArrayWrapper<T>;
|
||||
tail(): LoDashImplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.rest
|
||||
* @see _.tail
|
||||
*/
|
||||
rest<T>(): LoDashImplicitArrayWrapper<T>;
|
||||
tail<T>(): LoDashImplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitArrayWrapper<T> {
|
||||
/**
|
||||
* @see _.rest
|
||||
* @see _.tail
|
||||
*/
|
||||
rest(): LoDashExplicitArrayWrapper<T>;
|
||||
tail(): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.rest
|
||||
* @see _.tail
|
||||
*/
|
||||
rest<T>(): LoDashExplicitArrayWrapper<T>;
|
||||
tail<T>(): LoDashExplicitArrayWrapper<T>;
|
||||
}
|
||||
|
||||
//_.slice
|
||||
|
||||
Reference in New Issue
Block a user