You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// @ts-check/** * @param {number} x - the first number to add * @param {number} y - the second number to add * @returns {number} * * @example * ```ts * add(1, 2) // 3 * ``` */exportfunctionadd(x,y){returnx+y}
Running the command deno doc --html --name="Adder" add.mjs
Expected output
add(x: number,y: number): number
Parameters
x: number
the first number to add
y: number
the second number to add
Return Type
number
Examples
Example 1
add(1,2)// 3
Actual output
add(x,y)
Parameters
x
the first number to add
y
the second number to add
Return Type
It would be awesome if JSDoc types and @examples were also picked up for .js and .mjs files.
The text was updated successfully, but these errors were encountered:
lionel-rowe
changed the title
Get type info from JSDoc for .js/.mjs files
Get type info and examples from JSDoc for .js/.mjs files
Mar 28, 2024
Given the following file
add.mjs
:Running the command
deno doc --html --name="Adder" add.mjs
Expected output
Actual output
It would be awesome if JSDoc types and
@example
s were also picked up for.js
and.mjs
files.The text was updated successfully, but these errors were encountered: