Closed
Description
Repro
{
"rules": {
"@typescript-eslint/require-await": "error"
}
}
async function* foo() {
await Promise.resolve()
yield 1
}
async function* bar() {
yield* foo()
}
Expected Result
No error. bar
has to be async because it delegates to foo
, which is async.
Actual Result
Error: Async generator function has no 'await' expression.
Additional Info
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
2.22.0 |
@typescript-eslint/parser |
X.Y.Z |
TypeScript |
X.Y.Z |
ESLint |
X.Y.Z |
node |
X.Y.Z |
npm |
X.Y.Z |