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
JSDoc support for object literal fields #290
Comments
It seems this is related to getting JSDoc for contextually-typed object literals. This should likely work just as you'd expect. |
Pretty sure that this issue is what I'm hitting with this type of code: const someFunc = () => {
return {
/** This JSDoc comment doesn't leave the function */
one: "1",
/** Neither does this */
two: "2"
}
}
const a = someFunc()
a.one
// ^?
type A = ReturnType<typeof someFunc>
// ^? Both |
I realize now that the |
@johnnyreilly do you remember what this was about? I would imagine this: interface Foo {
/**
* Hallo this is JSDoc
*/
yadda(): void
}
let x: Foo = {
yadda() {
}
} which seems to be fixed. |
@orta if I hover on that in the playground, that seems to work. |
Wow - this an old issue! I do vaguely remember raising it - but not more than that. The way intellisense is powered in Visual Studio has radically changed now I understand. I should say I haven't used VS in about four years though. Apologies |
Historical Information
|
@DanielRosenwasser @johnnyreilly I've tried a couple of things in VS Code and all basic cases seem to work just fine nowadays. It's probably best to close this issue as it was most likely fixed along the way. |
johnnyreilly commentedJul 29, 2014
When inside a definition file (eg jquery.d.ts) and hovering over an interface member which has been JSDoc'd then intellisense is presented to the user in Visual Studio.
However, when in a different file which is making use of those definitions the same rich interface intellisense is not presented. Just the type and name - none of the JSDoc stuff flows through.
It would be good if it did.
Migrated from http://typescript.codeplex.com/workitem/2463
The text was updated successfully, but these errors were encountered: