microsoft / microsoft/TypeScript

Idea: Distinguish between build-signature declarations and for-publication declarations

Abierto
#44,047 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Domain: Performance
Lenguaje dominante
Go
Estrellas
111k
Forks
14.4k
Merge medio
1 d 19 h
PR fusionados (30 d)
117

Descripción

Some declaration files are intended for publication and they need to be readable and "work" (e.g. no imports from node_modules). Others are, from a user's perspective, basically temporary files produced by the build to make subsequent builds more incremental (i.e. faster). Right now, we produce both sets of declaration files in the same way, but maybe we don't need to? As far as I can tell, the characteristics we require from "build" declarations are:

  1. They change if-and-only-if the API of the underlying code changes
  2. A source map can get you back from the declaration file to the input file

We can satisfy these requirements without, e.g.

  1. Pretty-printing
  2. Adding imports (as in #44044)
  3. Confirming that referenced types are actually accessible (simplifying #44045)
  4. Complaining about node_modules imports

One likely snag is how users will opt in to this behavior (Is it enough to be composite/incremental without having declarations? Is yet another switch required?).

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.

Línea de trabajo

Empieza leyendo la distinción del issue entre build-signature y publication declarations, y después investiga el comportamiento existente de composite/incremental y declarations. Revisa las discusiones relacionadas en #44044 y #44045. La tarea estaría terminada cuando exista un diseño opt-in decidido y una implementación que preserve el API-change tracking y la source-map navigation, al tiempo que relaje los publication-only checks para build declarations.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
typescript
Área
build-system, compilers
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.