-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Support @class in JSDoc #12681
Labels
Domain: JavaScript
The issue relates to JavaScript specifically
Domain: JSDoc
Relates to JSDoc parsing and type generation
Has Repro
This issue has compiler-backed repros: https://aka.ms/ts-repros
Help Wanted
You can do this
Suggestion
An idea for TypeScript
VS Code Tracked
There is a VS Code equivalent to this issue
Milestone
Comments
Still can be repro'ed in playground. In VS Code, hover shows correct type. // @noImplicitAny: false
// @noImplicitThis: false
/**
* @class
*
* @param {number} x
*/
function Foo(x) {
this.x = x
}
/**
* @param {Foo} foo
*/
const request = function(foo) {
// ^?
} |
👋 Hi, I'm the Repro bot. I can help narrow down and track compiler bugs across releases! This comment reflects the current state of this repro running against the nightly TypeScript.
Historical Information
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Domain: JavaScript
The issue relates to JavaScript specifically
Domain: JSDoc
Relates to JSDoc parsing and type generation
Has Repro
This issue has compiler-backed repros: https://aka.ms/ts-repros
Help Wanted
You can do this
Suggestion
An idea for TypeScript
VS Code Tracked
There is a VS Code equivalent to this issue
From microsoft/vscode#15168
For the following JavaScript code:
The
@class
jsdoc annotation forFoo
does not seem to be recognized, so the type offoo
inrequest
isany
:Changing the code to use
class
fixes the issue (you don't actually need the@class
in this case):The text was updated successfully, but these errors were encountered: