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
The curly braces are "required" around the @type tag's value in the sense that it's always a good idea to use them. If you omit the curly braces in this case, JSDoc will be forgiving and try to parse your type expression anyhow. But the best practice is to use curly braces.
The documentation for "@type" (http://usejsdoc.org/tags-type.html) implies that curly braces are required.
The referenced Google Closure Compiler type specifications state:
However there is one example on the "@type" page in which the curly braces are not used (see third line):
This is inconsistent and has led to some confusion. I got here while researching this question on stack overflow: http://stackoverflow.com/questions/19237372/what-are-jsdoc-type-curly-braces-for/
Could the docs please be updated to explain cases where {} are not required or could the example be fixed?
Thanks
The text was updated successfully, but these errors were encountered: