TypeScript Version: 4.2.0-dev.20201219
Search Terms:
Symbol.iterator Symbol.asyncIterator
Code
export class Polling {
private async *[Symbol.asyncIterator]() {}
private *[Symbol.iterator]() {}
async loop() {
for await (const updates of this) {
void updates
}
}
syncLoop() {
for (const updates of this) {
void updates
}
}
}
Expected behavior:
No errors.
Actual behavior:
'[Symbol.asyncIterator]' is declared but its value is never read.
'[Symbol.iterator]' is declared but its value is never read.
Playground Link