microsoft / microsoft/TypeScript-TmLanguage
Generic constructor with more than one generic type can break syntax highlighting.
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 471
- Fork
- 149
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
JavaScript and TypeScript Nightly version:
Last released - 4/4/2023, 02:09:37
Last updated - 4/4/2023, 18:09:42
Code
export class Foo {
readonly bar = {
map: new Map<
Type1, Type2>([])
};
private function() {
return 1;
}
}
The code above breaks syntax highlighting, I have also tested in insiders vscode with nightly typescript.

It is fine, if both generics are on the same line as the main type:

If there is only 1 generic, it does slightly better, the highlighting of the generic is wrong, but the rest of the file is ok.

Or if the argument to the constructor is not a list, this it is also recoverable, although both the highlighting of the generic, and the closing angle bracket are wrong.

Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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.
Direzione di ricerca
Non è indicato alcun file sorgente o test. Inizia riproducendo l'esempio multilinea in TypeScript di un costruttore generico presente nell'issue, confrontalo con le varianti funzionanti e traccia la grammatica TypeScript TextMate responsabile dell'evidenziazione della sintassi. Il lavoro è concluso quando il codice mostrato e il file che lo circonda mantengono un'evidenziazione corretta.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript, vscode
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100