quick-lint-js
quick-lint-js copied to clipboard
TypeScript: ':' sometimes misinterpreted after arrow function head
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.