microsoft / microsoft/TypeScript
Document link for reference types and path
Nessuno ha ancora preso questa issue.
- Lingua principale
- Go
- Stelle
- 111k
- Fork
- 14.3k
- Merge medio
- 1g 19h
- PR unite (30g)
- 117
Descrizione
🔍 Search Terms
In js, we can have
/// <reference types="tree-sitter-cli/dsl" />
// or
/// <reference path="node_modules/tree-sitter-cli/dsl.d.ts" />
/// <reference types="@types/firefox-webext-browser" />
Can we have a document link for file://$PWD/node_modules/tree-sitter-cli/dsl.d.ts and file://$PWD/node_modules/@types/firefox-webext-browser/index.d.ts?
✅ 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
Add document link for LSP
📃 Motivating Example
Easier to jump the path by document link
And maybe we can have completion for /// <reference types="|" />, where | is cursor.
💻 Use Cases
- What do you want to use this for?
- What shortcomings exist with current approaches?
- What workarounds are you using in the meantime?
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 la gestione LSP dei triple-slash reference types e dei path directives descritti nell’issue. Verifica come il language service risolve questi riferimenti, quindi verifica che le destinazioni dei file richieste espongano document links; considera completion come un ambito separato, salvo diversa precisazione.
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