class MyCollection<T> { *[Symbol.iterator](): IterableIterator<MyCollectionEntry<T>> { for (const thingy of this.thingies) { yield { ... } } } }