Skip to content
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

Typescript style-only imports are not resolving correctly #25358

Closed
mjbvz opened this issue Jul 2, 2018 · 2 comments
Closed

Typescript style-only imports are not resolving correctly #25358

mjbvz opened this issue Jul 2, 2018 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jul 2, 2018

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

@DanielRosenwasser
Copy link
Member

Looks like one of

Can you try out our nightly (npm install -g typescript@next) and see if you're able to reproduce the issue?

@ghost
Copy link

ghost commented Jul 3, 2018

Fix should just have been merged with #25364, please try with typescript@next.

@ghost ghost added Duplicate An existing issue was already created and removed Needs More Info The issue still hasn't been fully clarified labels Jul 3, 2018
@ghost ghost closed this as completed Jul 3, 2018
This issue was closed.
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

2 participants