Skip to content

Typescript style-only imports are not resolving correctly #25358

Closed

Description

@mjbvz

From KSnyde on July 1, 2018 17:43

  • VSCode Version: Version 1.24.1 (1.24.1)
  • OS Version: macOS 10.13.5

Steps to Reproduce:

  1. use tsc to transpile (using TS 3.0.0-dev.20180603) project with dynamic import like:

    private static _defaultDb: import("abstracted-firebase").RealTimeDB;
  2. run tsc with the following tsconfig.json:

    {
      "compilerOptions": {
        "declaration": true,
        "module": "esnext",
        "target": "es2017",
        "lib": ["es2017", "esnext.asynciterable", "es2015.reflect"],
        "moduleResolution": "node",
        "sourceMap": true,
        "noImplicitAny": true,
        "experimentalDecorators": true,
        "emitDecoratorMetadata": true,
        "outDir": "./dist/esnext",
        "removeComments": false,
        "typeRoots": ["./node_modules/@types"]
      },
      "include": ["src/**/*"],
      "exclude": ["node_modules/**/*", "node_modules/@firebase/**/*.d.ts"]
    }

No errors are reported but if you go into the .d.ts file where the import existed you'll find a transpilation similar to:

    protected _db: import("../../../../../../Users/ken/mine/forest-fire/firemodel/src/decorators/schema").RealTimeDB;

Does this issue occur when all extensions are disabled?: Yes

Copied from original issue: microsoft/vscode#53400

Activity

  1. removed their assignment
    on Jul 2, 2018
  2. DanielRosenwasser commented on Jul 2, 2018

    @DanielRosenwasser
    Member
  3. ghost added
    Needs More InfoThe issue still hasn't been fully clarified
    on Jul 2, 2018
  4. ghost added
    DuplicateAn existing issue was already created
    on Jul 3, 2018
  5. ghost removed
    Needs More InfoThe issue still hasn't been fully clarified
    on Jul 3, 2018
  6. ghost closed this as completedon Jul 3, 2018
  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

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions