15 * @param {string} n - A string param
16 * @return {string} A good string
23 function foo(n) { return n }
26 See: <http://usejsdoc.org/index.html>
30 | Type | Description |
32 | `@param {string=} n` | Optional |
33 | `@param {string} [n]` | Optional |
34 | `@param {(string\|number)} n`| Multiple types |
35 | `@param {*} n` | Any type |
36 | `@param {...string} n` | Repeatable arguments |
37 | `@param {string} [n="hi"]` | Optional with default |
38 | `@param {string[]} n` | Array of strings |
40 See: <http://usejsdoc.org/tags-type.html>
63 * @typedef {Object} Song
64 * @property {string} title - The title
65 * @property {string} artist - The artist
66 * @property {number} year - The year
73 * @param {Song} song - The {@link Song} to be played
76 function play (song) {
80 See: <http://usejsdoc.org/tags-typedef.html>
86 * @typedef {import('./Foo').default} Bar
96 This syntax is [TypeScript-specific](https://github.com/Microsoft/TypeScript/wiki/JsDoc-support-in-JavaScript#import-types).
102 * @throws {FooException}
121 Prefer `alias` over `name`. See: <http://usejsdoc.org/tags-alias.html>