//#region src/array/from.d.ts /** * Get an array with a specified length, filled with indices * * @param length Length of the array * @returns Array of indices * * @example * ```typescript * range(5); // => [0, 1, 2, 3, 4] * ``` */ declare function range(length: number): number[]; /** * Get an array of numbers in a specified range * * @param start Starting number _(inclusive)_ * @param end Ending number _(exclusive)_ * @returns Array of numbers in range * * @example * ```typescript * range(2, 5); // => [2, 3, 4] * ``` */ declare function range(start: number, end: number): number[]; /** * Get an array of numbers in a specified range with a specified step * * @param start Starting number _(inclusive)_ * @param end Ending number _(exclusive)_ * @param step Step between numbers * @returns Array of numbers in range * * @example * ```typescript * range(0, 10, 2); // => [0, 2, 4, 6, 8] * ``` */ declare function range(start: number, end: number, step: number): number[]; /** * Get an array with a specified length, filled with indices * * @param length Length of the array * @returns Array of indices * * @example * ```typescript * times(5); // => [0, 1, 2, 3, 4] * ``` */ declare function times(length: number): number[]; /** * Get an array with a specified length, filled by values from a callback * * @param length Length of the array * @param callback Callback function to generate values * @returns Array of values generated by the callback * * @example * ```typescript * times(5, index => index * 2); // => [0, 2, 4, 6, 8] * ``` */ declare function times unknown>(length: number, callback: Callback): ReturnType[]; /** * Get an array with a specified length, filled with a specified value * * @param length Length of the array * @param value Value to fill the array with * @returns Array filled with the specified value * * @example * ```typescript * times(5, 'a'); // => ['a', 'a', 'a', 'a', 'a'] * ``` */ declare function times(length: number, value: Value): Value[]; //#endregion export { range, times };