Faça um iterador de interface TIPO ITERADOR

interface Iterable<T> {
    [Symbol.iterator](): Iterator<T>;
}
Arrogant Alpaca