microsoft / microsoft/TypeScript
Computed property name is not escaped in declaration emit
Aperta
@weswigham ci sta già lavorando.
Dal 2/1/2025.
Bug
Domain: Declaration Emit
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.4k
- Merge medio
- 1g 19h
- PR unite (30g)
- 117
Descrizione
🔎 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
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Valutazione
Questa issue non è ancora stata valutata.