Page History
...
Using the JSDoc plugin hosted on ServoyForge it is also possible to generate HTML documentation of the JavaScript code in a Solution, based on the JSDOc supplied.
Stoc |
---|
What
...
Does JSDoc Consist Of
The JSDoc syntax consists of a set of JSDoc tags, contained in JSDoc comments.
...
Code Block |
---|
/** * A simple demo function that outputs some text * @author Tom * @private * * @param {String} text The text that will be written to the output * @throws (String) * returns Boolean * * @example try { * saySomething('Hello world!'); * } catch(e) { * * } * * @see application.output * @since 1.0 * @version 1.0.1<br> * - Added some more JSDoc tags for the demo */ function saySomething(text) { if (text == null || text.length == 0) { throw "Invalid input!" } application.output(text); return true; } |
Where
...
Does JSDoc Come From And Which Syntax Is Supported
JSDoc is not a official standard, but the defacto standard is is defined by the JSDoc Toolkit project. The other major definer of JSDoc is Google Closure Compiler's support for JavaScript annotation.
...
See Annotating JavaScript using JSDoc and Annotating JavaScript using JSDoc below for the supported tags and their syntax.
Working
...
With JSDoc
...
In The Script Editor
As mentioned in the intro, the Script Editor in Servoy Developer utilizes JSDoc to improve the quality of code completion and validation.
...