VSCodium / vscodium

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

Broken template literal type highlight without TypeScript Nightly extension #2074

Closed greentore closed 1 month ago

greentore commented 1 month 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 month ago

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

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

greentore commented 1 month 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 1 month ago

So the issue come from scoop?

daiyam commented 1 month ago

Hum, I've just tried scoop, no issue...

greentore commented 1 month ago

It was caused by vscode.typescript-1.62.3 in my extensions directory. I guess I copied the whole thing from vanilla vscode years ago. Bisect wouldn't find it as codium was treating it as native extension. Sorry again.

daiyam commented 1 month ago

That make sense. No problem.