You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using default parameters in JS/Flow, but using @param to provide param descriptions, the default value is lost.
// @flow/** * @param bar This is the bar parameter */functionfoo(bar: string='foo'){}
This can be "fixed" by repeating the default as part of the JSDoc comment.
// @flow/** * @param [bar='foo'] This is the bar parameter */functionfoo(bar: string='foo'){}
This is annoying however. It would be nice if the default value inferred from the function declaration could be merged with the description provided by JSDoc. Alternatively, if there were a way to provide only the description to @param and not the name, that would work too, but this doesn't seem possible in the JSDoc spec.
The text was updated successfully, but these errors were encountered:
When using default parameters in JS/Flow, but using
@param
to provide param descriptions, the default value is lost.This can be "fixed" by repeating the default as part of the JSDoc comment.
This is annoying however. It would be nice if the default value inferred from the function declaration could be merged with the description provided by JSDoc. Alternatively, if there were a way to provide only the description to
@param
and not the name, that would work too, but this doesn't seem possible in the JSDoc spec.The text was updated successfully, but these errors were encountered: