🔎 Search Terms
computed property symbol declaration emit
🕗 Version & Regression Information
- This changed between versions 3.7 and 3.8
⏯ Playground Link
https://www.typescriptlang.org/play/?ts=3.7.5#code/MYGwhgzhAEAq0G8BQ1XQgFzBglsaATgKZgAmA9gHYgCe0A2gEQA6GjAugFzQCulOARx5F0NALYAjciADcSAL5IQRDNAAe0ALyIUaerCasOXaAEYFMoA
💻 Code
class T {
static readonly ["\t"]: unique symbol;
}
let x = {
[T["\t"]]: 1
};
🙁 Actual behavior
The type of x is emitted as { [T["\t"]]: number; } in declaration files, making the file invalid since the property does not exist on T
🙂 Expected behavior
The escape should be preserved in the property name.
Additional information about the issue
Was introduced by 8bb7230
🔎 Search Terms
computed property symbol declaration emit
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play/?ts=3.7.5#code/MYGwhgzhAEAq0G8BQ1XQgFzBglsaATgKZgAmA9gHYgCe0A2gEQA6GjAugFzQCulOARx5F0NALYAjciADcSAL5IQRDNAAe0ALyIUaerCasOXaAEYFMoA
💻 Code
🙁 Actual behavior
The type of
xis emitted as{ [T["\t"]]: number; }in declaration files, making the file invalid since the property does not exist onT🙂 Expected behavior
The escape should be preserved in the property name.
Additional information about the issue
Was introduced by 8bb7230