softkave-js-utils
Version:
JavaScript & Typescript utility functions, types, and classes
6 lines (5 loc) • 326 B
TypeScript
import { AnyFn } from '../types.js';
export declare function loop<TOtherParams extends unknown[], TFn extends AnyFn<[number, ...TOtherParams]>>(fn: TFn,
/** counting is `0`-index based, so last iteration would be `6` if count is
* `7`, while first iteration will be `0`. */
max: number, ...otherParams: TOtherParams): void;