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

auto import broken that import as a relative path #25186

Closed
Kingwl opened this issue Jun 25, 2018 · 4 comments
Closed

auto import broken that import as a relative path #25186

Kingwl opened this issue Jun 25, 2018 · 4 comments
Labels
Duplicate An existing issue was already created

Comments

@Kingwl
Copy link
Contributor

Kingwl commented Jun 25, 2018

TypeScript Version: 3.0.0-dev.201xxxxx

Search Terms:
import, auto import
Code

// node_module/xxx/lib/index.d.ts
export declare a: number;

// src/a.ts
a/*here*/

Expected behavior:
insert the code: import { a } from 'xxx'
Actual behavior:
insert the code: import { a } from 'node_module/xxx/lib'

Related Issues:

seems by #24742

@Kingwl
Copy link
Contributor Author

Kingwl commented Jun 25, 2018

/cc: @andy-ms

@ghost
Copy link

ghost commented Jun 25, 2018

@Kingwl this seems to be working for me with typescript@next, with the caveat that I need import {} from "xxx/lib"; in a different file or else the package is not included in the project and can't be auto-imported. But if so, I'll get an auto-import from xxx/lib. This is with an empty tsconfig.json.

If you're still seeing a problem, since you're familiar with the codebase, maybe you could try writing a completionsImport_*** or importNameCodeFix_*** test like the ones we have already?

@mhegazy mhegazy added the Needs More Info The issue still hasn't been fully clarified label Jun 25, 2018
@Kingwl
Copy link
Contributor Author

Kingwl commented Jun 26, 2018

1
2

current behavior in my pc,
the test may be delayed, because my deadline(this week) is still coming😂

@ghost
Copy link

ghost commented Jul 3, 2018

Duplicate of #25279. Wasn't showing up on my computer since it was a windows-only issue.

@ghost ghost closed this as completed Jul 3, 2018
@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
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