microsoft / microsoft/TypeScript
Idea: Distinguish between build-signature declarations and for-publication declarations
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
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?).
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie damit, die Unterscheidung des Issues zwischen build-signature und publication declarations zu lesen, und untersuchen Sie anschließend das bestehende Verhalten von composite/incremental und declarations. Sehen Sie sich die zugehörigen Diskussionen in #44044 und #44045 an. Die Aufgabe wäre erst erledigt, wenn ein festgelegtes Opt-in-Design und eine Implementierung vorhanden sind, die das API-change tracking und die source-map navigation beibehalten und gleichzeitig publication-only checks für build declarations lockern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- build-system, compilers
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Muss geklärt werden
- Anfängerfreundlichkeit
- 25/100