From 324afef7721890dd5e8bc0ca9c2778705c90190c Mon Sep 17 00:00:00 2001 From: DomiR Date: Wed, 13 Jan 2016 19:04:20 +0100 Subject: [PATCH] (feature) Renamed _.restParam to _.rest --- lodash/lodash-tests.ts | 20 ++++++++++---------- lodash/lodash.d.ts | 18 +++++++++--------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index e342cb7c8..5c2b3d573 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -6132,8 +6132,8 @@ result = (_.rearg(testReargFn, [2, 0, 1]))('b', 'c' result = (_(testReargFn).rearg(2, 0, 1).value())('b', 'c', 'a'); result = (_(testReargFn).rearg([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(func); - result = _.restParam(func, 1); + result = _.rest(func); + result = _.rest(func, 1); - result = _.restParam(func); - result = _.restParam(func, 1); + result = _.rest(func); + result = _.rest(func, 1); } { let result: _.LoDashImplicitObjectWrapper; - result = _(func).restParam(); - result = _(func).restParam(1); + result = _(func).rest(); + result = _(func).rest(1); } { let result: _.LoDashExplicitObjectWrapper; - result = _(func).chain().restParam(); - result = _(func).chain().restParam(1); + result = _(func).chain().rest(); + result = _(func).chain().rest(1); } } diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index fabea5b90..05f51816e 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -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(...indexes: number[]): LoDashImplicitObjectWrapper; } - //_.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( + rest( func: Function, start?: number ): TResult; /** - * @see _.restParam + * @see _.rest */ - restParam( + rest( func: TFunc, start?: number ): TResult; @@ -9916,16 +9916,16 @@ declare module _ { interface LoDashImplicitObjectWrapper { /** - * @see _.restParam + * @see _.rest */ - restParam(start?: number): LoDashImplicitObjectWrapper; + rest(start?: number): LoDashImplicitObjectWrapper; } interface LoDashExplicitObjectWrapper { /** - * @see _.restParam + * @see _.rest */ - restParam(start?: number): LoDashExplicitObjectWrapper; + rest(start?: number): LoDashExplicitObjectWrapper; } //_.spread