microsoft / microsoft/TypeScript

Add JSDOC @module support for intellisense.

Aperta
#30,744 6 commenti 10 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Awaiting More Feedback Suggestion
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
2g 4h
PR unite (30g)
132

Descrizione

Search Terms

Intellisense jsdoc support for modules

Suggestion

When adding /** @module moduleName Module Description. */ to a module, then doing this:

import * as myName from "./moduleName";

I think it makes sense, when importing the whole namespace, to include the jsdoc @module comment.

I also think that when pressing Ctrl+Space for code completion on "./" (to get a list of modules) should also show the module documentation.

Use Cases

Better support for module documentation. I'm developing some module libraries and it would be great to give end users a good experience with better intellisense documentation.

Examples

aModule.ts

`/** @module aModule Does something awesome. */`

app.ts

import * as aModule from "./aModule";
// (moduleName should both have the doc details)
// ("./{*.*}" - all files in code completion should show the documentation as well)

Checklist

My suggestion meets these guidelines:

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

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Riproduci gli esempi in aModule.ts e app.ts, quindi esamina il JSDoc esistente e il comportamento del completamento dei moduli per gli import di namespace e i completamenti di "./". Il lavoro è completato quando la documentazione @module viene visualizzata per il namespace importato e accanto ai suggerimenti dei moduli, senza modificare l'output a runtime.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
javascript, typescript
Ambito
developer-experience, tooling
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.