π 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