microsoft / microsoft/TypeScript
Idea: Distinguish between build-signature declarations and for-publication declarations
Nadie ha tomado este issue todavía.
- 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:
- They change if-and-only-if the API of the underlying code changes
- A source map can get you back from the declaration file to the input file
We can satisfy these requirements without, e.g.
- Pretty-printing
- Adding imports (as in #44044)
- Confirming that referenced types are actually accessible (simplifying #44045)
- Complaining about
node_modulesimports
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
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
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