microsoft / microsoft/TypeScript-TmLanguage
Generic constructor with more than one generic type can break syntax highlighting.
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- TypeScript
- Estrellas
- 471
- Forks
- 149
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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.

Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
No se especifica ningún archivo fuente ni ninguna prueba. Empieza reproduciendo el ejemplo multilinea de TypeScript de un constructor genérico incluido en el issue, compáralo con las variantes que funcionan y sigue la gramática TypeScript TextMate responsable del resaltado de sintaxis. Se considera terminado cuando el código mostrado y el archivo que lo rodea conservan el resaltado correcto.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript, vscode
- Área
- tooling
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 48/100