Mark all optional params correctly within JSDoc comments
benjamincharity opened this issue · 0 comments
benjamincharity commented
Currently our JSDoc comments do not explicitly mark optional params. We should add this for clarity.
- Mark all optional params by wrapping the param name in curly brackets:
// Existing
/**
* Dispatches a keydown event from an element.
*
* @param type - The event type
* @param key - The KeyCode type
* @param target - The target element
* @return The event
*
* @example
* createKeyboardEvent('keydown', ENTER, myInputNativeElement);
*/
// After change:
/**
* Dispatches a keydown event from an element.
*
* @param type - The event type
* @param key - The KeyCode type
* @param {target} - The target element
* @return The event
*
* @example
* createKeyboardEvent('keydown', ENTER, myInputNativeElement);
*/