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

Add missing import use package.json "typings" property #23898

Closed
kukjevov opened this issue Apr 4, 2017 · 1 comment
Closed

Add missing import use package.json "typings" property #23898

kukjevov opened this issue Apr 4, 2017 · 1 comment
Assignees
Labels
typescript Typescript support issues

Comments

@kukjevov
Copy link

kukjevov commented Apr 4, 2017

  • VSCode Version: 1.10.2
  • OS Version: Windows 10

Add missing import is great feature but it does not work best way.

Lets say i have module @ng/common
in module i have package.json in root directory and index.d.ts in dist directory.

In package.json i have "typings": "dist/index.d.ts".

When i want to use this module i want to write import {Utils} from '@ng/common'; but vscode quick fix import missing import offers me different imports like this import {Utils} from '@ng/common/dist'; which is not what i want. Is it possible to make it look into package.json for obtaining these information about import? Also when i use @angular it is same. Sometimes it even offers me more options. Same things reexported from multiple files, but none exported using package.json.

Also nice thing would be if it uses shortest "path" export if some type is reexported.

I dont know if this is thing for vscode, or typescript directly.

Thank you for any help :).

@chrmarti chrmarti added the typescript Typescript support issues label Apr 4, 2017
@mjbvz
Copy link
Collaborator

mjbvz commented Apr 5, 2017

This issue was moved to microsoft/TypeScript#15020

@mjbvz mjbvz closed this as completed Apr 5, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

3 participants