type AvaliableKeyImpl = K extends any ? T[K] extends string | number ? K : never : never; /** * Pick the keys of a object whose values are suitable for use as a key. */ type AvaliableKey = AvaliableKeyImpl; /** * A function that generates a key for a item in a loop, * or a key of `T` object whose values are suitable for use as a key. */ export type LoopKey = AvaliableKey | ((item: T, index: number) => string | number); export declare const _for: import("../context").ContextMemberFactory<((iterable: Iterable, key: LoopKey, body: (item: T, index: number) => void) => void)>; export declare const forTimes: import("../context").ContextMemberFactory<(times: number, body: (index: number) => void) => void>; /** * The key generator that use the index of the item as the key. * * **Note**: This key generator is usually used when the array is static. * * @example * ```ts * _.for([a, b, c], byIndex, (item, index) => { * // ... * }); * ``` */ export declare const byIndex: (_item: unknown, index: number) => number; /** * The key generator that use the item itself as the key. * * **Note**: Only array of string or number can use this key generator. */ export declare const bySelf: (item: string | number) => string; export {}; //# sourceMappingURL=loop.d.ts.map