Skip to content

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

Closed

Description

TS Template added by Matt Bierner (@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

Activity

  1. removed their assignment
    on Feb 14, 2020
  2. added
    Working as IntendedThe behavior described is the intended behavior; this is not a bug
    Needs InvestigationThis issue needs a team member to investigate its status.
    and removed
    Working as IntendedThe behavior described is the intended behavior; this is not a bug
    on Feb 21, 2020
  3. andrewbranch commented on Feb 21, 2020

    @andrewbranch
    Member

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

  4. tx-steven commented on Feb 22, 2020

    @tx-steven
    Author

    Hey Andrew Branch (@andrewbranch), it works now after upgrading! thank you for the help

  5. added
    DuplicateAn existing issue was already created
    and removed
    Needs InvestigationThis issue needs a team member to investigate its status.
    on Feb 22, 2020
  6. andrewbranch commented on Feb 22, 2020

    @andrewbranch
    Member

    No problem!

    Marking as duplicate of #29038 for record-keeping

  7. locked as resolved and limited conversation to collaborators on Oct 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

DuplicateAn existing issue was already created

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions