Skip to content

Show an optional property in the property tag docs #172

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
hegemonic opened this issue Jul 17, 2017 · 0 comments
Closed

Show an optional property in the property tag docs #172

hegemonic opened this issue Jul 17, 2017 · 0 comments

Comments

@hegemonic
Copy link
Contributor

As noted in jsdoc/jsdoc#1407, the docs don't currently make it clear that the @property tag can be used to document an optional property, like so:

/**
 * @typedef {Object} Something
 * @property {string} someProperty - required
 * @property {string} [anotherProperty] - optional
 */

We should update the @property docs to show an example of an optional property so that this feature is more discoverable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant