microsoft / microsoft/TypeScript
Provide better displays for paths when not fully resolved
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.4k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
In https://github.com/microsoft/TypeScript/pull/44713, we started to do partial resolutions of paths for auto-import completions. This is great, however, it would be nice if we could do a small amount of work for common cases just to clean up paths that go through node_modules even without further keystrokes.
- In cases where the resolution strategy is
nodeand there are no path mappings, we could try to rewrite some number of dotted segments, followed bynode_modulesintopackage_name/...until fully resolved. - In other cases, we could even just use
containingFolderName/filename
Of course, there are risks here since in JS, string math isn't always cheap. In cases where you have hundreds of thousands of auto-imports from node_modules, this could still get expensive.
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 in PR #44713 eingeführte partielle Pfadauflösungslogik für Auto-Import-Vervollständigungen nachzuverfolgen, mit Schwerpunkt auf node_modules- und node-Auflösungsfällen. Vergleiche die vorgeschlagenen Anzeigen package_name/... und containingFolderName/filename und überprüfe, dass das Ergebnis für große node_modules-Vervollständigungsmengen weiterhin mit vertretbarem Aufwand umsetzbar 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
- Muss geklärt werden
- Anfängerfreundlichkeit
- 35/100