8 lines
280 B
TypeScript
8 lines
280 B
TypeScript
/**
|
|
* Generates an array by running a function n times
|
|
* @param n The number of times to run the function
|
|
* @param fn The function to generate each element
|
|
* @returns An array containing the results
|
|
*/
|
|
export declare function times<T>(n: number, f: (idx: number) => T): T[];
|