-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Auto-importHelp WantedYou can do thisYou can do this
Milestone
Description
π Search Terms
default export
auto-import
barrel export
π Version & Regression Information
- This changed between versions 5.3 and 5.4
β― Playground Link
Reproduction repository instead of playground because it needs at least 2 files. One in ts and one in js.
https://github.com/jasonlyu123/auto-import-aliased
π» Code
// foo.ts
export default function foo() {}
function foo2() {}
export { foo2 }
// index.js
foo
// ^trigger completion here
π Actual behavior
No auto-import to import the function foo
and foo2
π Expected behavior
Has auto-import like in 5.3.
Additional information about the issue
This only happens in js files when trying to auto-import values from a ts file and the symbol has some alias or is a default export. This seems to have to do with #53619. In another check for type-only-location, the symbol flags are combined with flags from the aliased symbol and the symbol has flags like class
and function
.
dummdidumm and grentank
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: Auto-importHelp WantedYou can do thisYou can do this