Typescript doc visible for aliased imports, but not for single ones.
See original GitHub issueFrom @Elarcis on September 21, 2016 7:35
- VSCode Version: 1.5.2
- OS Version: Windows 7 Service Pack 1
- Typescript version: 2.0.2
Steps to Reproduce:
- have a
myClass.ts
file exporting aMyClass
class. Write some/** */
doc for that class. - In another file, try the following two ways of importing identifiers:
import { MyClass } from 'myModule';
MyClass // When hovering MyClass, the written doc is not visible.
import * as myModule from 'myModule';
myModule.MyClass // When hovering MyClass, the written doc appears.
It seems logical that the doc should appear in both cases, is this due to Typescript 2?
Copied from original issue: Microsoft/vscode#12360
Issue Analytics
- State:
- Created 7 years ago
- Reactions:13
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Documentation - Modules - TypeScript
Modules are declarative; the relationships between modules are specified in terms of imports and exports at the file level. Modules import one another...
Read more >Why does VSCode not pick up path aliases in tsconfig?
The tsconfig configuration will only apply to files matched by the "include" option and not excluded by the "exclude" option.
Read more >Using TypeScript aliases in Cypress tests - Gleb Bahmutov
How to configure TypeScript and Webpack path aliases to load ... Start the app in one terminal with npm start and open Cypress...
Read more >typescript-cheatsheet - GitHub Pages
declared in a module are not visible outside the module unless they are explicitly exported using one of the export forms. Conversely, to...
Read more >TypeScript | WebStorm Documentation - JetBrains
WebStorm supports developing, running, and debugging TypeScript source code. ... If there is only one source to import the symbol from, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is currently a huge painpoint. Improving this would be a very big win.
I’d also like to point out that default imports don’t get the (js)doc for that export either.
Hovering over
SomeDefaultExport
in both the import declaration as well as it’s uses in code will just show “import SomeDefaultExport
”.I’m not at my desktop at the moment, so I haven’t tested this, but imagine the same problem would exist with imports like this:
I’ll update this post when I’m able to test that.
My experience with this bug are in
typescript
, but I would imagine there would be the issue withjavascript
(that useses2015
imports). I’ll test that out too.Edit
the same issues also appears with JavaScript. In addition, this syntax also has the same problem.