microsoft / microsoft/TypeScript

Differential `typeToString` / smarter error truncation

Abierto
#42,597 0 comentarios 0 reacciones 1 asignado Ver en GitHub

@RyanCavanaugh ya está trabajando en esto.

Desde el 2/2/2021.

Domain: Error Messages Domain: LS: Type Display Experience Enhancement Experimentation Needed
Lenguaje dominante
Go
Estrellas
111k
Forks
14.3k
Merge medio
1 d 19 h
PR fusionados (30 d)
117

Descripción

Lots of the time, error truncation will kick in at the most inopportune time, and lose relevant properties that will be subsequently elaborated on. @RyanCavanaugh has been thinking about a smarter version of this where we can inform our string writers to be a little smarter and not throw away the relevant members of a union, or properties of an object.

But there are some areas that we need to kind of think through and be wary of.

  1. don't repeat yourself: if you end up repeating a constituent of a union on the next line, then was it the best thing to focus on that part of the union on the prior line? You might avoid surprising a user ("where'd that type come from!?") but you're potentially not gaining anything. This leads us to
  2. don't lose the right information: error messages don't always go down the most-appropriate path. If we try to over-focus on the types that the error decided to elaborate on, we shouldn't lose relevant information from other possible types.

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.