3 ms·
This can be condensed slightly, you don't need the inner function literal. In Typescript: class MyCollection<T> { *[Symbol.iterator](): IterableIterat
by jitl 4y ago
This can be condensed slightly, you don't need the inner function literal. In Typescript:
class MyCollection<T> {
*[Symbol.iterator](): IterableIterator<MyCollectionEntry<T>> {
for (const thingy of this.thingies) {
yield { ... }
}
}
}