5 ms·
Awesome work VSCode team!! I can't figure out how to enable TypeScript auto import - is it hidden behind a flag? Coming from IDEs, I've been waiting for this f
by bcherny 10y ago
Awesome work VSCode team!!
I can't figure out how to enable TypeScript auto import - is it hidden behind a flag? Coming from IDEs, I've been waiting for this feature for a long time.
- janwillemb 10y agoThere's an extension for that, search for typescript in the extension list.
- bcherny 10y agoThe extension is very low quality. TS2.2 shipped support for auto-importing missing dependencies, and VSCode mentions in this release that they support it. My hope is that this blessed implementation is better than the Auto Import extension.
- mattbierner 10y agoI work on TS and JS support for VSCode. Try moving the cursor into red squiggles for the missing symbol and then clicking on the lightbulb in the gutter or hitting cmd+period. This will bring up the quick fix menu for adding missing imports. We don't support automatically adding imports as you type, but this is something we are looking into. If you see any problems with the feature or have any suggestions on how it could be improved, please open an issue: https://github.com/Microsoft/vscode/issues/new https://github.com/Microsoft/vscode/issues/new
- bcherny 10y agoNo lightbulb, but cmd+. did it -- Thanks! Any way to format the import too (we use single quotes and no semicolon, enforced by TSLint)? Awesome job on JS/TS integration by the way. I've used Frontpage, Dreamweaver, Notepad++, Sublime, Atom, Vi, Webstorm, and Intellij in the past, and editing TS in VSCode beats all those other editors by a mile. Keep it up!!