microsoft / microsoft/TypeScript

typeAcquisition without import explicitly

Offen
#42,725 4 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Needs Investigation
Vorherrschende Sprache
Go
Sterne
111k
Forks
14.4k
Ø Merge
1 T. 19 Std.
Gemergte PRs (30 T.)
117

Beschreibung

VSCode has a feature in jsconfig.json called "typeAcquisition", but when I try to add some NPM package name into "typeAcquisition.include", there is no code IntelliSense, even those NPM packages has its types(d.ts).

I've tried several ways:

  1. import those library into one of JS file in workspace, and it works; (But this is also working without "typeAcquisition");
  2. try some other NPM package with its @types/xxx package installed, and it also works;

So I wonder if "typeAcquisition" can work with packages with types(d.ts), and without import those packages explicitly?

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Start with the jsconfig.json typeAcquisition.include setting and reproduce the behavior using an NPM package that provides its own d.ts files. Compare IntelliSense with and without an explicit import; done would mean the issue's requested package types are available without importing the packages explicitly.

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

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.