microsoft / microsoft/TypeScript

allow inline intellisense comment on es6 export

Offen
#30,620 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Experience Enhancement Suggestion
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.3k
Ø Merge
2 T. 4 Std.
Gemergte PRs (30 T.)
132

Beschreibung

Search Terms

intellisense export

Suggestion

allow inline intellisense documentation of es6 export, or at least propagate the intellisense comments of the exported package. currently nothing is exported (other than type definitions)

Use Cases

allows for index files for large libraries to have better descriptions of the sub-modules it contains.

current (working) approach is to use the old pre-es6 /** comment */export import x = requires("x")

Examples

/** promise fs based api and related quality-of-life helper functions */
import * as fs from "./fs";
export { fs };

the above intellisense comment doesn't propagate.

Checklist

My suggestion meets these guidelines:

  • [ X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
  • [ X] This wouldn't change the runtime behavior of existing JavaScript code
  • [ X] This could be implemented without emitting different JS based on the types of the expressions
  • [ X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
  • [ X] This feature would agree with the rest of TypeScript's Design Goals.

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die Verarbeitung des TypeScript-Compilers für JSDoc- oder IntelliSense-Kommentare bei ES6-Exportdeklarationen zu lokalisieren, und vergleiche sie anschließend mit dem bereitgestellten export { fs }-Beispiel. Als erledigt gilt die Aufgabe, wenn die Inline-Beschreibung an das exportierte Paket oder Modul weitergegeben wird, ohne das ausgegebene JavaScript zu ändern.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, typescript
Bereich
compilers
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.