microsoft / microsoft/TypeScript
Autocompletion is not working for TypeScript paths alias in import statements when omitting "baseUrl"
Open
@rbuckton is already working on this.
Since May 23, 2023.
Needs Investigation
Rescheduled
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 117
Description
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:
- Create a tsconfig.json with paths alias without specifying a "baseUrl":
{
"compilerOptions": {
"paths": {
"~/*": ["./src/*"],
},
},
}
- Try to trigger the autocompletion:
If baseUrl is set like "baseUrl": ".", here is the result of the autocompletion:
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.