mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-04 17:20:09 +00:00
Merge pull request #7867 from chrootsu/lodash-times
lodash: _.times changed
This commit is contained in:
@@ -10196,26 +10196,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);
|
||||
}
|
||||
|
||||
{
|
||||
@@ -10228,7 +10216,6 @@ module TestTimes {
|
||||
let result: _.LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
result = _(42).chain().times(iteratee);
|
||||
result = _(42).chain().times(iteratee, any);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
18
lodash/lodash.d.ts
vendored
18
lodash/lodash.d.ts
vendored
@@ -16657,18 +16657,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[];
|
||||
|
||||
/**
|
||||
@@ -16682,14 +16680,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> {
|
||||
@@ -16697,8 +16694,7 @@ declare module _ {
|
||||
* @see _.times
|
||||
*/
|
||||
times<TResult>(
|
||||
iteratee: (num: number) => TResult,
|
||||
thisArgs?: any
|
||||
iteratee: (num: number) => TResult
|
||||
): LoDashExplicitArrayWrapper<TResult>;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user