The code sample for the @typedef tag provided by the wiki is wrong.
It is currently displaying the following.
/**
* @typedef {{
* foo:string,
* bar:number,
* foobar:number|string
* }}
*/
var Mytype;
This results in error because there are no parenthesis around the | operands.
I would PR the wiki if it were possible, so instead I've demonstrated my proposed fix elsewhere.
The code sample for the
@typedeftag provided by the wiki is wrong.It is currently displaying the following.
This results in error because there are no parenthesis around the
|operands.I would PR the wiki if it were possible, so instead I've demonstrated my proposed fix elsewhere.