First of all, I would like to thank the extensive and excellent work is done with this tool. The generation of custom-elements.json from JSDoc comments is helpful in a wide range of situations.
We have a minor error with a class method with two parameters:
{string} event
{Object} [detail={}]
The code is:
/**
* Simple class
*/
class Simple extends HTMLElement {
/**
* Fire an event
* @param {string} event - event name
* @param {Object} [detail={}] - optional event detail object
* @returns {boolean} - return true
*/
fireEvent (event, detail = {}) {
return this.dispatchEvent (new CustomEvent (
event,
{bubbles : true, cancelable : true, detail}
));
}
}
The method type is generated as "type": "(event: string, detail?: string): boolean", but the parameters object defines detail as Object:
First of all, I would like to thank the extensive and excellent work is done with this tool. The generation of custom-elements.json from JSDoc comments is helpful in a wide range of situations.
We have a minor error with a class method with two parameters:
{string} event
{Object} [detail={}]
The code is:
The method type is generated as
"type": "(event: string, detail?: string): boolean"
, but theparameters
object definesdetail
asObject
:As a result, the method type parameter
detail?: string
is wrong.