VSCodium / vscodium

binary releases of VS Code without MS branding/telemetry/licensing
https://vscodium.com
MIT License
25.26k stars 1.09k forks source link

Broken template literal type highlight without TypeScript Nightly extension #2074

Closed greentore closed 1 hour ago

greentore commented 3 hours ago

Describe the bug infer T extends ... syntax within template literal types is highlighted incorrectly. It works fine in vanilla VSCode and VSCodium with TypeScript Nightly extension installed from open-vsx.

Please confirm that this problem is VSCodium-specific

Please confirm that the issue/resolution isn't already documented

To Reproduce

type T0 = "100" extends `${infer T extends number}` ? T : never; // 100
type T1 = "100" extends `${infer T extends bigint}` ? T : never; // 100n
type T2 = "true" extends `${infer T extends boolean}` ? T : never; // true

Taken from https://github.com/microsoft/TypeScript/pull/48094

Expected behavior Template literal highlight shouldn't leak beyond the closing tick.

Screenshots Broken broken Working working

Desktop (please complete the following information):

daiyam commented 1 hour ago

I can't reproduce the issue on Win10 or macOS.

Have you looked into the logs: View/Output/TypeScript?

greentore commented 1 hour ago

It looks like my scoop installation is borked. I can reproduce it on 2 computers with fresh profiles, but not if I run a build downloaded from github directly. Sorry for the noise.

daiyam commented 4 minutes ago

So the issue come from scoop?