From d81c162a12fe72416ecc510417338174c1b7aa38 Mon Sep 17 00:00:00 2001 From: Ilya Mochalov Date: Thu, 28 Jan 2016 00:23:02 +0500 Subject: [PATCH] lodash: _.times changed --- lodash/lodash-tests.ts | 15 +-------------- lodash/lodash.d.ts | 18 +++++++----------- 2 files changed, 8 insertions(+), 25 deletions(-) diff --git a/lodash/lodash-tests.ts b/lodash/lodash-tests.ts index 5c52443587..02c29be3a6 100644 --- a/lodash/lodash-tests.ts +++ b/lodash/lodash-tests.ts @@ -10173,26 +10173,14 @@ module TestTimes { let result: number[]; result = _.times(42); + result = _(42).times(); } { let result: TResult[]; result = _.times(42, iteratee); - result = _.times(42, iteratee, any); - } - - { - let result: _.LoDashImplicitArrayWrapper; - - result = _(42).times(); - } - - { - let result: _.LoDashImplicitArrayWrapper; - result = _(42).times(iteratee); - result = _(42).times(iteratee, any); } { @@ -10205,7 +10193,6 @@ module TestTimes { let result: _.LoDashExplicitArrayWrapper; result = _(42).chain().times(iteratee); - result = _(42).chain().times(iteratee, any); } } diff --git a/lodash/lodash.d.ts b/lodash/lodash.d.ts index b6e884fc9b..35d2a0801e 100644 --- a/lodash/lodash.d.ts +++ b/lodash/lodash.d.ts @@ -16632,18 +16632,16 @@ declare module _ { //_.times interface LoDashStatic { /** - * Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee is - * bound to thisArg and invoked with one argument; (index). + * Invokes the iteratee function n times, returning an array of the results of each invocation. The iteratee + * is invoked with one argument; (index). * * @param n The number of times to invoke iteratee. * @param iteratee The function invoked per iteration. - * @param thisArg The this binding of iteratee. * @return Returns the array of results. */ times( n: number, - iteratee: (num: number) => TResult, - thisArg?: any + iteratee: (num: number) => TResult ): TResult[]; /** @@ -16657,14 +16655,13 @@ declare module _ { * @see _.times */ times( - iteratee: (num: number) => TResult, - thisArgs?: any - ): LoDashImplicitArrayWrapper; + iteratee: (num: number) => TResult + ): TResult[]; /** * @see _.times */ - times(): LoDashImplicitArrayWrapper; + times(): number[]; } interface LoDashExplicitWrapper { @@ -16672,8 +16669,7 @@ declare module _ { * @see _.times */ times( - iteratee: (num: number) => TResult, - thisArgs?: any + iteratee: (num: number) => TResult ): LoDashExplicitArrayWrapper; /**