microsoft / microsoft/TypeScript
`@experimental` JSDoc tag, with strikethrough style (or similar) like `@deprecated` JSDoc tag
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.4k
- Merge medio
- 1g 19h
- PR unite (30g)
- 117
Descrizione
🔍 Search Terms
experimental jsdoc tag
✅ Viability Checklist
- 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, new syntax sugar for JS, etc.)
- This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals
⭐ Suggestion
I would like to mark some new APIs as "experimental" with an @experimental JSDoc tag, and have people's IDE's show a visual hint (like how @deprecated styles text with strike-through)
📃 Motivating Example
There's no way (unless I missed it) to introduce an experimental feature and to have that reflected in IDEs like @deprecated does. Example:
/**
* @experimental Not ready for production. This feature is slated to land in the next minor. Early feedback welcome!
*/
export function doSomethingNewAndCool() {
// ...
}
and then IDEs would highlight this in a certain way in the code, for example like how @deprecated styles text with a strike through.
/**
* @deprecated Not ready for production. This feature is slated to land in the next minor and be un-deprecated. Early feedback welcome!
*/
export function doSomethingNewAndCool() {
// ...
}
💻 Use Cases
See motivating example.
For now, a workaround is to use @deprecated, then clearly denote that the feature will be un-deprecated in a following release, but some people might misinterpret that or not read the whole message:
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia tracciando come viene riconosciuto il tag @deprecated di JSDoc esistente e come gli IDE ne rendono lo stile visivo. Determina i punti di ingresso del servizio del linguaggio e dell’editor coinvolti, quindi definisci il comportamento previsto per @experimental e verificalo rispetto all’esempio motivante e al comportamento esistente del tag deprecated.
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à
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100