-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Add parameters' type information in JSDoc comments scaffolding #12722
Conversation
Hi @anubmat, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
TTYL, MSBOT; |
@@ -166,15 +166,20 @@ namespace ts.JsDoc { | |||
const lineStart = sourceFile.getLineStarts()[posLineAndChar.line]; | |||
|
|||
const indentationStr = sourceFile.text.substr(lineStart, posLineAndChar.character); | |||
const isJavaScriptFile = hasJavaScriptFileExtension(sourceFile.fileName); // JSX or JS file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that this comment adds anything.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed.. added because of jsx files... will remove.
👍 after addressing my one nit. |
Looks good for now. We might want to make this behavior optional (based on a editor config setting) if we get feedback that some folks don't like it. I'd assume some devs don't want the type annotations in their JsDoc comments. Thanks! 👍 |
Adds type {any} in comments for parameters in JS and JSX files
Earlier type was missing: