15 * @param {string} n - A string param
16 * @return {string} A good string
28 See: <https://jsdoc.app/index.html>
32 | Type | Description |
33 | ------------------------------- | ------------------------------------- |
34 | `@param {string=} n` | Optional |
35 | `@param {string} [n]` | Optional |
36 | `@param {(string|number)} n` | Multiple types |
37 | `@param {*} n` | Any type |
38 | `@param {...string} n` | Repeatable arguments |
39 | `@param {string} [n="hi"]` | Optional with default |
40 | `@param {string[]} n` | Array of strings |
41 | `@return {Promise<string[]>} n` | Promise fulfilled by array of strings |
43 See: <https://jsdoc.app/tags-type.html>
66 * @typedef {Object} Song
67 * @property {string} title - The title
68 * @property {string} artist - The artist
69 * @property {number} year - The year
76 * @param {Song} song - The {@link Song} to be played
79 function play(song) {}
82 See: <https://jsdoc.app/tags-typedef.html>
91 * @typedef {{title: string, artist: string, year: number}} Song
100 * @param {Song} song - The {@link Song} to be played
103 function play(song) {}
106 See: <https://jsdoc.app/tags-typedef.html>
112 * @typedef {import('./Foo').default} Bar
122 This syntax is [TypeScript-specific](https://github.com/Microsoft/TypeScript/wiki/JsDoc-support-in-JavaScript#import-types).
128 * @throws {FooException}
138 See the full list: <https://jsdoc.app/index.html#block-tags>
149 Prefer `alias` over `name`. See: <https://jsdoc.app/tags-alias.html>