microsoft / microsoft/TypeScript

Autocompletion is not working for TypeScript paths alias in import statements when omitting "baseUrl"

Offen
#54,295 0 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

@rbuckton arbeitet bereits daran.

Seit 23.5.2023.

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

Beschreibung

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: Version: 1.79.0-insider
  • OS Version: Darwin arm64 22.4.0

Steps to Reproduce:

  1. Create a tsconfig.json with paths alias without specifying a "baseUrl":
{
  "compilerOptions": {
    "paths": {
      "~/*": ["./src/*"],
    },
  },
}
  1. Try to trigger the autocompletion:
image

If baseUrl is set like "baseUrl": ".", here is the result of the autocompletion:
image

As baseUrl is optional since TypeScript 4.1, shouldn't VS Code set it to the same folder path where the tsconfig.json is located if omitted?

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.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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