-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 #15020
Comments
@kukjevov Can you please provide a small example project that demonstrates this issue? |
Hello :). Thx for quick reaction. Here is example that illustrates what i described. https://github.com/kukjevov/typescript-import if you clone it and run In index.ts you can see what i want and how imports should look like. But for Same thing happens for Also interesting thing that i found out, that if i dont have at least one import from Just one note to this, is there going to be option to set if i want spaces around brackets in import statements? Anyway thx for great job and any help :) |
I've had similar issues where package.json |
@mjbvz Have you looked at this :)? Thank you for any help :). |
@kukjevov I took a look at this issue on the VSCode side but the problem seems to lie with the TypeScript server itself. That's why I moved the issue to the TypeScript repo. A TypeScript contributor should be able to help investigate this issue |
Hello can some of Typescript team look at this, it would be nice feature :). ping @sandersn @ahejlsberg @yuit @RyanCavanaugh Thank you :) |
tracked by #15223 |
From @kukjevov on April 4, 2017 18:30
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 andindex.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 thisimport {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 :).
Copied from original issue: microsoft/vscode#23898
The text was updated successfully, but these errors were encountered: