Skip to content

TypeScript gets into bad editing state with async arrow functions #37522

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

This seems to be an issue with 3.8 and newer. 3.7.5 doesn't exhibit this behavior.

There's a couple of ways to observe this. First, try writing out the following code character-by-character.

let x = async () => {
    
}

You'll get

let x = async () => {
        ~~~~~~~~
Cannot find name 'async'.

Alternatively, paste the full example into a buffer. Then erase the c in async.

let x = asyn () => {
    
}

Give it a second, then add it back. TypeScript doesn't seem to refresh its semantic diagnostics for some reason.

You'll get

let x = async () => {
        ~~~~
Cannot find name 'asyn'.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions