Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Async generator method is not flagged as a generator #297

Closed
@azz

Description

@azz

What version of TypeScript are you using?

2.3.2

What version of typescript-eslint-parser are you using?

master

What code were you trying to parse?

class C {
    async * f() {
        const x = yield* g();
    }
}

What did you expect to happen?

generator: true on FunctionExpression.

What happened?

generator: false on FunctionExpression.

Stage 3 async iteration spec: https://tc39.github.io/proposal-async-iteration/#prod-AsyncGeneratorMethod

The TypeScript parser provides an asteriskToken on the MethodDeclaration node that can be used for this.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions