microsoft / microsoft/TypeScript
Computed property name is not escaped in declaration emit
Offen
@weswigham arbeitet bereits daran.
Seit 02.1.2025.
Bug
Domain: Declaration Emit
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
🔎 Search Terms
computed property symbol declaration emit
🕗 Version & Regression Information
- This changed between versions 3.7 and 3.8
⏯ Playground Link
💻 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 https://github.com/microsoft/TypeScript/pull/18860/commits/8bb7230729f43f1c134f895a535e73c4cd58af3e
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Bewertung
Dieses Issue wurde noch nicht bewertet.