We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeScript Version: 4.1-dev.20200924 in VSCode 1.49.1 on Windows 10
Search Terms: auto import folder same name export
Code Lets say you have the following folder structure:
/foo/index.ts /entry.ts /foo.ts
/foo/index.ts has the following contents:
export const Bar = 1;
and the other files are empty.
In /entry.ts you try typing "Bar" and use the auto-import feature.
/entry.ts
Expected behavior: After typing "Bar" and using the auto-import feature, the file should look like this:
import { Bar } from "./foo/"; Bar
Actual behavior:
import { Bar } from "./foo"; Bar
This import refers to /foo.ts , not /foo/index.ts
/foo.ts
/foo/index.ts
Note that if /foo.ts is not present, the actual behavior is correct.
Playground Link:
Related Issues:
The text was updated successfully, but these errors were encountered:
Duplicate of #36730
Sorry, something went wrong.
This issue has been marked as a 'Duplicate' and has seen no recent activity. It has been automatically closed for house-keeping purposes.
No branches or pull requests
TypeScript Version: 4.1-dev.20200924 in VSCode 1.49.1 on Windows 10
Search Terms: auto import folder same name export
Code
Lets say you have the following folder structure:
/foo/index.ts has the following contents:
and the other files are empty.
In
/entry.ts
you try typing "Bar" and use the auto-import feature.Expected behavior:
After typing "Bar" and using the auto-import feature, the file should look like this:
Actual behavior:
This import refers to
/foo.ts
, not/foo/index.ts
Note that if
/foo.ts
is not present, the actual behavior is correct.Playground Link:
Related Issues:
The text was updated successfully, but these errors were encountered: