Skip to content

Support JSDoc parameters with properties using @param #16056

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

Closed
BrunnerLivio opened this issue May 24, 2017 · 2 comments
Closed

Support JSDoc parameters with properties using @param #16056

BrunnerLivio opened this issue May 24, 2017 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@BrunnerLivio
Copy link

BrunnerLivio commented May 24, 2017

This is a suggestion/feature request for the @ts-check feature.

When using // @ts-check in a JavaScript file, TypeScript-check should be able to identify object properties types using JSDoc.

For example:

// @ts-check
/*
 * @param {Object} bar The bar object
 * @param {Number} bar.id The id of the bar object
 * @param {Object} bar.foo The foo object
 * @param {Number} bar.foo.id The id of the foo object
 */
export function Foo(bar) {
  console.log(bar.id); // TypeScript: "Holy moly it is a number"
  console.log(bar.foo.id); // TypeScript: "OMG another one"
}

Also described on JSDoc.

I hope you get the idea :)
Keep up the good work!

@BrunnerLivio BrunnerLivio changed the title Support JSDoc object with @param Support JSDoc parameters with properties using @param May 24, 2017
@mhegazy
Copy link
Contributor

mhegazy commented May 24, 2017

Looks like a duplicate of #11597

@mhegazy mhegazy added the Duplicate An existing issue was already created label May 24, 2017
@mhegazy
Copy link
Contributor

mhegazy commented Jun 8, 2017

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

@mhegazy mhegazy closed this as completed Jun 8, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

2 participants