import type {Sequence} from './types'; interface ForEachTrait { forEach(callback: (value: V, key: K, self: this) => void): void; } interface PlainObject { [key: string]: T; } export default function forEach( iterable: ForEachTrait, callback: (value: V, key: K) => void ): void; export default function forEach( iterable: Iterator | Iterable | Sequence, callback: (item: T, index: number) => void ): void; export default function forEach( object: PlainObject, callback: (value: T, key: string) => void ): void;