microsoft / microsoft/TypeScript
Document link for reference types and path
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
🔍 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?
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
Beginne damit, die im Issue beschriebenen LSP-Verarbeitung für die triple-slash reference types und path directives nachzuverfolgen. Prüfe, wie der language service diese Referenzen auflöst, und verifiziere anschließend, dass die angeforderten Dateiziele document links bereitstellen; behandle completion als separaten Umfang, sofern dies nicht geklärt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, typescript
- Bereich
- developer-experience, tooling
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100