You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Auto-import suggestions still given for absolute imports without baseUrl #40713
auto-import paths, auto-import suggestions without baseUrl
Code
Here is a repo with a reproduction. It's a cut down version of a monorepo I redesigned to use paths (then hit the unfortunate auto-import behavior pre-4.1).
When no baseUrl is specified, auto-import suggestions should not be offered for paths like src/foo/bar if they aren't valid. This should work as a result of #40546 and associated changes, and is mentioned in the TS 4.1 beta blog post. In this example, I expect there to be no absolute import because baseUrl is missing, no absolute import via paths as I have not defined one for the current package, leaving me with a relative path suggestion (what I want for consistency with the codebase).
Actual behavior:
These suggestions are still offered. When accepted, TS immediately marks the import as invalid.
Playground Link:
I'm not sure the playground would allow me to have multiple files, hence the repro repo.
Related Issues:
#31869 is related, but I believe my issue to be a bug in that implementation.
Activity