<script>
/**
* The method comment.
* @param {string} param1 - the first parameter
* @param {boolean} [param2=false] - the second parameter
* @returns {number} - return value description
*/
export function publicMethod(param1, param2) {
return 0;
};
</script>
But having this auto-documentation will be even more awesome:
<script>
/**
* The method comment.
* @param param2 - description of the second param
* @returns {number} - return value description
*/
export function publicMethod(param1 = "a", param2 = 1) {
return 0;
};
</script>
Here we can infer the parameter type as well as the default value because of the ES6 assignment pattern.
And all we have to do is supply a description in the comments
This works awesome:
But having this auto-documentation will be even more awesome:
Here we can infer the parameter type as well as the default value because of the ES6 assignment pattern. And all we have to do is supply a description in the comments