(feature) Renamed _.restParam to _.rest

This commit is contained in:
DomiR
2016-01-23 14:39:10 +01:00
parent a7699d15e7
commit 324afef772
2 changed files with 19 additions and 19 deletions
+10 -10
View File
@@ -6132,8 +6132,8 @@ result = <string[]>(_.rearg<TestReargResultFn>(testReargFn, [2, 0, 1]))('b', 'c'
result = <string[]>(_(testReargFn).rearg<TestReargResultFn>(2, 0, 1).value())('b', 'c', 'a');
result = <string[]>(_(testReargFn).rearg<TestReargResultFn>([2, 0, 1]).value())('b', 'c', 'a');
// _.restParam
module TestRestParam {
// _.rest
module TestRest {
type Func = (a: string, b: number[]) => boolean;
type ResultFunc = (a: string, ...b: number[]) => boolean;
@@ -6142,25 +6142,25 @@ module TestRestParam {
{
let result: ResultFunc;
result = _.restParam<ResultFunc>(func);
result = _.restParam<ResultFunc>(func, 1);
result = _.rest<ResultFunc>(func);
result = _.rest<ResultFunc>(func, 1);
result = _.restParam<ResultFunc, Func>(func);
result = _.restParam<ResultFunc, Func>(func, 1);
result = _.rest<ResultFunc, Func>(func);
result = _.rest<ResultFunc, Func>(func, 1);
}
{
let result: _.LoDashImplicitObjectWrapper<ResultFunc>;
result = _(func).restParam<ResultFunc>();
result = _(func).restParam<ResultFunc>(1);
result = _(func).rest<ResultFunc>();
result = _(func).rest<ResultFunc>(1);
}
{
let result: _.LoDashExplicitObjectWrapper<ResultFunc>;
result = _(func).chain().restParam<ResultFunc>();
result = _(func).chain().restParam<ResultFunc>(1);
result = _(func).chain().rest<ResultFunc>();
result = _(func).chain().rest<ResultFunc>(1);
}
}
+9 -9
View File
@@ -23,7 +23,7 @@ TODO:
- [x] Renamed _.padLeft & _.padRight to _.padStart & _.padEnd
- [x] Renamed _.pairs to _.toPairs
- [x] Renamed _.rest to _.tail
- [ ] Renamed _.restParam to _.rest
- [x] Renamed _.restParam to _.rest
- [ ] Renamed _.sortByOrder to _.orderBy
- [ ] Renamed _.trimLeft & _.trimRight to _.trimStart & _.trimEnd
- [ ] Renamed _.trunc to _.truncate
@@ -9888,7 +9888,7 @@ declare module _ {
rearg<TResult extends Function>(...indexes: number[]): LoDashImplicitObjectWrapper<TResult>;
}
//_.restParam
//_.rest
interface LoDashStatic {
/**
* Creates a function that invokes func with the this binding of the created function and arguments from start
@@ -9900,15 +9900,15 @@ declare module _ {
* @param start The start position of the rest parameter.
* @return Returns the new function.
*/
restParam<TResult extends Function>(
rest<TResult extends Function>(
func: Function,
start?: number
): TResult;
/**
* @see _.restParam
* @see _.rest
*/
restParam<TResult extends Function, TFunc extends Function>(
rest<TResult extends Function, TFunc extends Function>(
func: TFunc,
start?: number
): TResult;
@@ -9916,16 +9916,16 @@ declare module _ {
interface LoDashImplicitObjectWrapper<T> {
/**
* @see _.restParam
* @see _.rest
*/
restParam<TResult extends Function>(start?: number): LoDashImplicitObjectWrapper<TResult>;
rest<TResult extends Function>(start?: number): LoDashImplicitObjectWrapper<TResult>;
}
interface LoDashExplicitObjectWrapper<T> {
/**
* @see _.restParam
* @see _.rest
*/
restParam<TResult extends Function>(start?: number): LoDashExplicitObjectWrapper<TResult>;
rest<TResult extends Function>(start?: number): LoDashExplicitObjectWrapper<TResult>;
}
//_.spread