lodash: _.times changed

This commit is contained in:
Ilya Mochalov
2016-01-29 05:58:21 +05:00
parent 86dbea8fc3
commit d81c162a12
2 changed files with 8 additions and 25 deletions
+1 -14
View File
@@ -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<number>;
result = _(42).times();
}
{
let result: _.LoDashImplicitArrayWrapper<TResult>;
result = _(42).times(iteratee);
result = _(42).times(iteratee, any);
}
{
@@ -10205,7 +10193,6 @@ module TestTimes {
let result: _.LoDashExplicitArrayWrapper<TResult>;
result = _(42).chain().times(iteratee);
result = _(42).chain().times(iteratee, any);
}
}
+7 -11
View File
@@ -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<TResult>(
n: number,
iteratee: (num: number) => TResult,
thisArg?: any
iteratee: (num: number) => TResult
): TResult[];
/**
@@ -16657,14 +16655,13 @@ declare module _ {
* @see _.times
*/
times<TResult>(
iteratee: (num: number) => TResult,
thisArgs?: any
): LoDashImplicitArrayWrapper<TResult>;
iteratee: (num: number) => TResult
): TResult[];
/**
* @see _.times
*/
times(): LoDashImplicitArrayWrapper<number>;
times(): number[];
}
interface LoDashExplicitWrapper<T> {
@@ -16672,8 +16669,7 @@ declare module _ {
* @see _.times
*/
times<TResult>(
iteratee: (num: number) => TResult,
thisArgs?: any
iteratee: (num: number) => TResult
): LoDashExplicitArrayWrapper<TResult>;
/**