Open
Description
I understand this is getting quite ambiguous for the parser 🙈.
In TSX files, arrow functions with generics look a lot like JSX. In this issue the TypeScript side suggests there will be no fix and that extending or having multiple generics are two ways in which the parser can tell the arrow function from JSX. Sadly, this syntax also breaks all highlighting coming after it. Example below.
const updateSet = <T extends {}>(choice, set: Set<T>): Set<T> =>
choice.isShown ? set.delete(choice.id) : set.add(choice.id);
};
// broken highlighting after this point