If a type statement (e.g. as number) occurs in backticks, the syntax highlighting breaks from a point shortly after until the end of the buffer. Furthermore, indentation sometimes breaks. I have yet to figure out under what circumstances indentation breaks but here is a minimal example of how to get the syntax highlighting to break:
if(true) {
const a = [1, 'a'];
console.log(`${Math.max((a[0] as number), 5)}`);
} else {
console.log('b');
}
If a type statement (e.g.
as number
) occurs in backticks, the syntax highlighting breaks from a point shortly after until the end of the buffer. Furthermore, indentation sometimes breaks. I have yet to figure out under what circumstances indentation breaks but here is a minimal example of how to get the syntax highlighting to break:It looks like this: