quick-lint-js icon indicating copy to clipboard operation
quick-lint-js copied to clipboard

TypeScript: ':' sometimes misinterpreted after arrow function head

Open strager opened this issue 3 years ago • 0 comments

The following is legal TypeScript:

function async<T>(...args: any) {}
interface Type {}
var foo
var banana
type Banana = Promise<void>;
var params

let x = foo ? async<Type>(params) : banana
let y = foo ? async<Type>(params) : Banana => {} : null

quick-lint-js doesn't interpret the last two lines correctly.

Be sure to test non-generic and non-async.

strager avatar Jul 27 '22 05:07 strager