import { ArrayIterator, ArrayLikeIterator, ObjectIterator, StringIterator, WithNullable } from './types'; export interface ForEach { (collection: WithNullable, iteratee?: ArrayIterator): T[]; (collection: WithNullable, iteratee?: StringIterator): string; (collection: WithNullable>, iteratee?: ArrayLikeIterator): ArrayLike; (collection: WithNullable, iteratee?: ObjectIterator): T; } /** * 创建迭代集合方法 * * @private * @param dir 迭代方向 * @returns 迭代集合方法 */ declare function createForEach(dir: 1 | -1): ForEach; export default createForEach;