-
Notifications
You must be signed in to change notification settings - Fork 485
Optional properties #347
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
Comments
Optional properties cannot be specified at this point; JSDoc doesn't support optional properties and as a result doctrine (the parser documentation.js uses) doesn't either. If you're interested in rallying support for this idea, the first place to start would be to get it into the doctrine parser. |
jsdoc3 marks property |
|
We need to infer it too: type T = {
opt?: number,
req: string,
}; (I looked at this a few days ago and I didn't see any support in Doctrine?) |
This feature was implemented yesterday. This is output for property {
"name": "b",
"lineNumber": 3,
"type": {
"type": "OptionalType",
"expression": {
"type": "NameExpression",
"name": "Number"
}
}
} |
I see. The type is optional, not the field. I guess we could work with that. On Wed, Sep 14, 2016, 06:09 ikokostya [email protected] wrote:
|
Hmm. Yes, this is weird, but consistent with optional parameters which have |
documentation
skips optional properties intypedef
declaration:How I can define optional properties?
The text was updated successfully, but these errors were encountered: