_From @Elarcis on September 21, 2016 7:35_
Steps to Reproduce:
myClass.ts file exporting a MyClass class. Write some /** */ doc for that class.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_
_From @chrmarti on September 21, 2016 16:42_
Can reproduce with the given example and TypeScript 1.8 in todays insider build.
Repro'd with latest TypeScript release bits - release-2.0.5 branch.
Here is code to copy and paste.
test.ts
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.
myModule.ts
/**
* Some documentation
*/
export class MyClass {
}
sending to TypeScript language service repo.
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.
import SomeDefaultExport from './FooBar';
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:
import { Foo as Bar } from './FooBar';
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 with javascript (that uses es2015 imports). I'll test that out too.
the same issues also appears with JavaScript.
In addition, this syntax also has the same problem.
import { Foo as Bar } from './FooBar';
I've lost quite some time thinking I was doing type exports / imports wrong due to not seeing the docs on hover. 馃槄
What's the status on this? Waiting for someone from the community to work on it?
I'm the one who reported https://github.com/Microsoft/vscode/issues/28753. You can see the repro easily there.
This _seems_ like something basic that should just work, especially considering that props work fine (and that seems like it'd be harder to support). :D But anyways, please fix/include the class/component-level docs inclusion soon!
Is this a duplicate of #5515?
Most helpful comment
This is currently a huge painpoint. Improving this would be a very big win.