Skip to content

Auto imports using import <module> = require() instead of import <module> from #36809

New issue

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

Closed
tx-steven opened this issue Feb 14, 2020 · 3 comments
Closed
Assignees
Labels
Duplicate An existing issue was already created

Comments

@tx-steven
Copy link

tx-steven commented Feb 14, 2020

TS Template added by @mjbvz

TypeScript Version: 3.7.5

Search Terms

  • auto imports
  • javascript

Hey guys. Recently I noticed my auto imports options as well as my quick fix options are not using import from syntax with modules that don't have a default export. Did something change recently settings or configuration to cause this?

tsconfig:
Screen Shot 2020-02-14 at 2 08 29 PM

  • VSCode Version: 1.42.1
  • OS Version: macOS Mojave 10.14.3

Steps to Reproduce:

  1. type out a function
  2. use auto imports or select from quick fix options
  3. import default option no longer available

Screen Shot 2020-02-14 at 2 11 19 PM

Screen Shot 2020-02-14 at 2 11 58 PM

@mjbvz mjbvz transferred this issue from microsoft/vscode Feb 14, 2020
@mjbvz mjbvz removed their assignment Feb 14, 2020
@RyanCavanaugh RyanCavanaugh added Working as Intended The behavior described is the intended behavior; this is not a bug Needs Investigation This issue needs a team member to investigate its status. and removed Working as Intended The behavior described is the intended behavior; this is not a bug labels Feb 21, 2020
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.9.0 milestone Feb 21, 2020
@andrewbranch
Copy link
Member

@tx-steven this should be fixed by #36475. Can you try with TypeScript 3.8?

@tx-steven
Copy link
Author

Hey @andrewbranch, it works now after upgrading! thank you for the help

@andrewbranch andrewbranch added Duplicate An existing issue was already created and removed Needs Investigation This issue needs a team member to investigate its status. labels Feb 22, 2020
@andrewbranch
Copy link
Member

No problem!

Marking as duplicate of #29038 for record-keeping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants