Skip to content
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

Merged
merged 6 commits into from
Dec 8, 2016

Conversation

anubmat
Copy link
Contributor

@anubmat anubmat commented Dec 7, 2016

Adds type {any} in comments for parameters in JS and JSX files
image

Earlier type was missing:
image

@msftclas
Copy link

msftclas commented Dec 7, 2016

Hi @anubmat, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!


It looks like you're a Microsoft contributor (Anubha Mathur). If you're full-time, we DON'T require a Contribution License Agreement. If you are a vendor, please DO sign the electronic Contribution License Agreement. It will take 2 minutes and there's no faxing! https://cla.microsoft.com.

TTYL, MSBOT;

@anubmat
Copy link
Contributor Author

anubmat commented Dec 8, 2016

@jramsay , @billti , @vlad, Can someone please review?

@@ -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
Copy link
Member

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.

Copy link
Contributor Author

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.

@DanielRosenwasser
Copy link
Member

👍 after addressing my one nit.

@billti
Copy link
Member

billti commented Dec 8, 2016

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! 👍

@anubmat anubmat merged commit 07ce4bd into master Dec 8, 2016
@anubmat anubmat deleted the correctCommentsScaffolding branch December 8, 2016 19:38
@mhegazy mhegazy mentioned this pull request Dec 12, 2016
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants