CEP-Resources icon indicating copy to clipboard operation
CEP-Resources copied to clipboard

JSDoc parsing error in type expressions for @param tags

Open stockerman7 opened this issue 2 years ago • 0 comments

Hello! I encountered a problem with the type expressions of JSDoc @param tags in the CSInterface.js file(CEP 10.x Used). The issue occurs in lines 1221 and 1262. When running JSDoc, it throws the following errors:

ERROR: Unable to parse a tag's type expression for source file /Users/[user_name]/Desktop/Adobe Photoshop Dev/Adobe Photoshop HTML Panels Development/CSInterface.js in line 1221 with tag title "param" and text "keyEventsInterest      A JSON string describing those key events you are interested in. A null object or
metaKey:  [optional] (Mac Only) a Boolean that indicates if the Meta key was pressed (true) or not (false) when the event occu                     On Macintosh keyboards, this is the command key. To detect Windows key on Windows, please use keyCode ins]": Invalid type expression ""keyCode": 48": Expected "!", ".", "<", "=", "?", "[]", "|", or end of input but ":" found.
ERROR: Unable to parse a tag's type expression for source file /Users/[user_name]/Desktop/Adobe Photoshop Dev/Adobe Photoshop HTML Panels Development/CSInterface.js in line 1262 with tag title "param" and text "keyEventsInterest      A JSON string describing those key events you are interested in. A null object or
metaKey:  [optional] (Mac Only) a Boolean that indicates if the Meta key was pressed (true) or not (false) when the event occu                     On Macintosh keyboards, this is the command key. To detect Windows key on Windows, please use keyCode ins]": Invalid type expression ""keyCode": 48": Expected "!", ".", "<", "=", "?", "[]", "|", or end of input but ":" found.

It seems that the type expressions in the mentioned lines are not following the correct JSDoc syntax. Please take a look at this issue and update the type expressions accordingly to prevent parsing errors when generating documentation.

I found a solution by updating the type expressions in the JSDoc comments to follow the correct syntax. Here's the updated JSDoc comment for the problematic lines:

/**
 * ...
 * @param {string} keyEventsInterest - A JSON string describing those key events you are interested in. A null object or...
 * @param {boolean} [metaKey] - (Mac Only) A Boolean that indicates if the Meta key was pressed (true) or not (false) when the event occurred. On Macintosh keyboards, this is the command key. To detect Windows key on Windows, please use keyCode instead.
 * ...
 */

Please consider updating the JSDoc comments in the CSInterface.js file with the suggested fix to prevent parsing errors when generating documentation.

stockerman7 avatar Apr 08 '23 05:04 stockerman7