diff --git a/about-block-inline-tags.html b/about-block-inline-tags.html index 0bcce6a1..29980f62 100644 --- a/about-block-inline-tags.html +++ b/about-block-inline-tags.html @@ -55,8 +55,7 @@ <h2 id="examples">Examples</h2> Shoe.prototype.setColor = function(color) { // ... }; -</code></pre> - </figure> +</code></pre></figure> <p>You can use inline tags within a description, as shown above, or within a block tag, as shown below:</p> <figure> <figcaption>Inline tag used within a block tag</figcaption><pre class="prettyprint lang-js"><code>/** @@ -68,8 +67,7 @@ <h2 id="examples">Examples</h2> Shoe.prototype.setColor = function(color) { // ... }; -</code></pre> - </figure> +</code></pre></figure> <p>When you use multiple block tags in a JSDoc comment, they must be separated by line breaks:</p> <figure> <figcaption>Multiple block tags separated by line breaks</figcaption><pre class="prettyprint lang-js"><code>/** @@ -81,13 +79,11 @@ <h2 id="examples">Examples</h2> Shoe.prototype.setLaceType = function(color, type) { // ... }; -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/about-commandline.html b/about-commandline.html index 6eab5391..c9c51912 100644 --- a/about-commandline.html +++ b/about-commandline.html @@ -35,8 +35,8 @@ <h2>Table of Contents</h2> <pre class="prettyprint"><code>/path/to/jsdoc yourSourceCodeFile.js anotherSourceCodeFile.js ... </code></pre> <p>where <code>...</code> are paths to other files to generate documentation for.</p> - <p>Additionally, one may provide the path to a <a href="http://daringfireball.net/projects/markdown/">Markdown file</a> (ending in ".md") or a file named - "README", and this will be added to the documentation on the front page. See <a href="about-including-readme.html">these + <p>Additionally, one may provide the path to a <a href="http://daringfireball.net/projects/markdown/">Markdown file</a> (ending in <code>.md</code>) or a file named + <code>README</code>, and this will be added to the documentation on the front page. See <a href="about-including-readme.html">these instructions</a>.</p> <p>JSDoc supports a number of command-line options, many of which have both long and short forms. Alternatively, the command-line options may be <a href="about-configuring-jsdoc.html">specified in a configuration file</a> given to JSDoc. The command-line options are:</p> <table> @@ -48,107 +48,87 @@ <h2>Table of Contents</h2> </thead> <tbody> <tr> - <td><code>-a <value></code>, <code>--access <value></code> - </td> + <td><code>-a <value></code>, <code>--access <value></code></td> <td>Only display symbols with the given <code>access</code> property: <code>private</code>, <code>protected</code>, <code>public</code>, or <code>undefined</code>, or <code>all</code> for all access levels. By default, all except <code>private</code> symbols are shown.</td> </tr> <tr> - <td><code>-c <value></code>, <code>--configure <value></code> - </td> + <td><code>-c <value></code>, <code>--configure <value></code></td> <td>The path to a JSDoc <a href="about-configuring-jsdoc.html">configuration file</a>. Defaults to <code>conf.json</code> or <code>conf.json.EXAMPLE</code> in the directory where JSDoc is installed.</td> </tr> <tr> - <td><code>-d <value></code>, <code>--destination <value></code> - </td> + <td><code>-d <value></code>, <code>--destination <value></code></td> <td>The path to the output folder for the generated documentation. For JSDoc's built-in Haruki template, use <code>console</code> to dump data to the console. Defaults to <code>./out</code>.</td> </tr> <tr> - <td><code>--debug</code> - </td> + <td><code>--debug</code></td> <td>Log information that can help debug issues in JSDoc itself.</td> </tr> <tr> - <td><code>-e <value></code>, <code>--encoding <value></code> - </td> + <td><code>-e <value></code>, <code>--encoding <value></code></td> <td>Assume this encoding when reading all source files. Defaults to <code>utf8</code>.</td> </tr> <tr> - <td><code>-h</code>, <code>--help</code> - </td> + <td><code>-h</code>, <code>--help</code></td> <td>Display information about JSDoc's command-line options, then exit.</td> </tr> <tr> - <td><code>--match <value></code> - </td> + <td><code>--match <value></code></td> <td>Only run tests whose names contain <code>value</code>.</td> </tr> <tr> - <td><code>--nocolor</code> - </td> + <td><code>--nocolor</code></td> <td>When running tests, do not use color in the console output. On Windows, this option is enabled by default.</td> </tr> <tr> - <td><code>-p</code>, <code>--private</code> - </td> + <td><code>-p</code>, <code>--private</code></td> <td>Include symbols marked with the <a href="tags-private.html"><code>@private</code> tag</a> in the generated documentation. By default, private symbols are not included.</td> </tr> <tr> - <td><code>-P</code>, <code>--package</code> - </td> + <td><code>-P</code>, <code>--package</code></td> <td>The <code>package.json</code> file that contains the project name, version, and other details. Defaults to the first <code>package.json</code> file found in the source paths.</td> </tr> <tr> - <td><code>--pedantic</code> - </td> + <td><code>--pedantic</code></td> <td>Treat errors as fatal errors, and treat warnings as errors. Defaults to <code>false</code>.</td> </tr> <tr> - <td><code>-q <value></code>, <code>--query <value></code> - </td> + <td><code>-q <value></code>, <code>--query <value></code></td> <td>A query string to parse and store in the global variable <code>env.opts.query</code>. Example: <code>foo=bar&baz=true</code>.</td> </tr> <tr> - <td><code>-r</code>, <code>--recurse</code> - </td> + <td><code>-r</code>, <code>--recurse</code></td> <td>Recurse into subdirectories when scanning for source files and tutorials.</td> </tr> <tr> - <td><code>-R</code>, <code>--readme</code> - </td> + <td><code>-R</code>, <code>--readme</code></td> <td>The <code>README.md</code> file to include in the generated documentation. Defaults to the first <code>README.md</code> file found in the source paths.</td> </tr> <tr> - <td><code>-t <value></code>, <code>--template <value></code> - </td> + <td><code>-t <value></code>, <code>--template <value></code></td> <td>The path to the template to use for generating output. Defaults to <code>templates/default</code>, JSDoc's built-in default template.</td> </tr> <tr> - <td><code>-T</code>, <code>--test</code> - </td> + <td><code>-T</code>, <code>--test</code></td> <td>Run JSDoc's test suite, and print the results to the console.</td> </tr> <tr> - <td><code>-u <value></code>, <code>--tutorials <value></code> - </td> + <td><code>-u <value></code>, <code>--tutorials <value></code></td> <td>Directory in which JSDoc should search for tutorials. If omitted, no tutorial pages will be generated. See the <a href="about-tutorials.html">tutorial instructions</a> for more information.</td> </tr> <tr> - <td><code>-v</code>, <code>--version</code> - </td> + <td><code>-v</code>, <code>--version</code></td> <td>Displays JSDoc's version number, then exits.</td> </tr> <tr> - <td><code>--verbose</code> - </td> + <td><code>--verbose</code></td> <td>Log detailed information to the console as JSDoc runs. Defaults to <code>false</code>.</td> </tr> <tr> - <td><code>-X</code>, <code>--explain</code> - </td> + <td><code>-X</code>, <code>--explain</code></td> <td>Dump all doclets to the console in JSON format, then exit.</td> </tr> </tbody> @@ -157,12 +137,10 @@ <h2 id="examples">Examples</h2> <p>Generate documentation for files in the <code>./src</code> directory, using the configuration file <code>/path/to/my/conf.json</code>, and save the output in the <code>./docs</code> directory:</p> <figure><pre class="prettyprint"><code>/path/to/jsdoc src -r -c /path/to/my/conf.json -d docs -</code></pre> - </figure> +</code></pre></figure> <p>Run all JSDoc tests whose names include the word <code>tag</code>, and log information about each test:</p> <figure><pre class="prettyprint"><code>/path/to/jsdoc -T --match tag --verbose -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="about-configuring-jsdoc.html">Configuring JSDoc with a configuration file</a> @@ -170,8 +148,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/about-configuring-default-template.html b/about-configuring-default-template.html index 600f33e9..298c2146 100644 --- a/about-configuring-default-template.html +++ b/about-configuring-default-template.html @@ -103,8 +103,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/about-configuring-jsdoc.html b/about-configuring-jsdoc.html index 692416fb..e4b6660d 100644 --- a/about-configuring-jsdoc.html +++ b/about-configuring-jsdoc.html @@ -69,16 +69,14 @@ <h2 id="configuration-file-formats">Configuration file formats</h2> <figcaption>JSON configuration file</figcaption><pre class="prettyprint lang-js"><code>{ "plugins": ["plugins/markdown"] } -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>JavaScript configuration file</figcaption><pre class="prettyprint lang-js"><code>'use strict'; module.exports = { plugins: ['plugins/markdown'] }; -</code></pre> - </figure> +</code></pre></figure> <p>For a more comprehensive example of a JSON configuration file, see the file <a href="https://github.com/jsdoc3/jsdoc/blob/master/conf.json.EXAMPLE"><code>conf.json.EXAMPLE</code></a>.</p> <h2 id="default-configuration-options">Default configuration options</h2> @@ -100,8 +98,7 @@ <h2 id="default-configuration-options">Default configuration options</h2> "monospaceLinks": false } } -</code></pre> - </figure> +</code></pre></figure> <p>This means:</p> <ul> <li>No plugins are loaded (<code>plugins</code>).</li> @@ -128,8 +125,7 @@ <h2 id="configuring-plugins">Configuring plugins</h2> "plugins/summarize" ] } -</code></pre> - </figure> +</code></pre></figure> <p>See the <a href="about-plugins.html">plugin reference</a> for further information, and look in <a href="https://github.com/jsdoc3/jsdoc/tree/master/plugins">JSDoc's <code>plugins</code> directory</a> for the plugins built into JSDoc.</p> <p>You can configure the Markdown plugin by adding a <code>markdown</code> object to your configuration file. See @@ -141,8 +137,7 @@ <h2 id="specifying-recursion-depth">Specifying recursion depth</h2> <figure><pre class="prettyprint lang-js"><code>{ "recurseDepth": 10 } -</code></pre> - </figure> +</code></pre></figure> <h2 id="specifying-input-files">Specifying input files</h2> <p>The <code>source</code> set of options, in combination with paths given to JSDoc on the command line, determines the set of input files that JSDoc uses to generate documentation.</p> @@ -154,16 +149,15 @@ <h2 id="specifying-input-files">Specifying input files</h2> "excludePattern": "(^|\\/|\\\\)_" } } -</code></pre> - </figure> +</code></pre></figure> <ul> <li><code>source.include</code>: An optional array of paths that contain files for which JSDoc should generate documentation. The paths given to JSDoc on the command line are combined with these paths. You can use the <a href="about-commandline.html"><code>-r</code> command-line option</a> to recurse into subdirectories.</li> <li><code>source.exclude</code>: An optional array of paths that JSDoc should ignore. In JSDoc 3.3.0 and later, this array may include subdirectories of the paths in <code>source.include</code>.</li> <li><code>source.includePattern</code>: An optional string, interpreted as a regular expression. If present, all filenames must match this regular expression to - be processed by JSDoc. By default, this option is set to ".+\.js(doc|x)?$", meaning that only files with the extensions <code>.js</code>, <code>.jsdoc</code>, - and + be processed by JSDoc. By default, this option is set to <code>.+&#92;.js(doc|x)?$</code>, meaning that only files with the extensions <code>.js</code>, + <code>.jsdoc</code>, and <code>.jsx</code> will be processed.</li> <li><code>source.excludePattern</code>: An optional string, interpreted as a regular expression. If present, any file matching this regular expression will be ignored. By default, this option is set so that files beginning with an underscore (or anything under a directory beginning with an underscore) is ignored. @@ -188,8 +182,7 @@ <h2 id="specifying-input-files">Specifying input files</h2> |- a.js |- ignore.js |- d.txt -</code></pre> - </figure> +</code></pre></figure> <p>In addition, suppose your <code>conf.json</code> file looks like this example:</p> <figure><pre class="prettyprint lang-js"><code>{ "source": { @@ -199,17 +192,13 @@ <h2 id="specifying-input-files">Specifying input files</h2> "excludePattern": "(^|\\/|\\\\)_" } } -</code></pre> - </figure> +</code></pre></figure> <p>If you run <code>jsdoc myProject/c.js -c /path/to/my/conf.json -r</code> from the file containing the <code>myProject</code> folder, JSDoc will generate documentation for the following files:</p> <ul> - <li><code>myProject/a.js</code> - </li> - <li><code>myProject/c.js</code> - </li> - <li><code>myProject/lib/a.js</code> - </li> + <li><code>myProject/a.js</code></li> + <li><code>myProject/c.js</code></li> + <li><code>myProject/lib/a.js</code></li> </ul> <p>Here's why:</p> <ol> @@ -238,8 +227,7 @@ <h2 id="specifying-the-source-type">Specifying the source type</h2> <figure><pre class="prettyprint lang-js"><code>{ "sourceType": "module" } -</code></pre> - </figure> +</code></pre></figure> <h2 id="incorporating-command-line-options-into-the-configuration-file">Incorporating command-line options into the configuration file</h2> <p>You can put many of JSDoc's <a href="about-commandline.html">command-line options</a> into the configuration file instead of specifying them on the command line. To do this, add the long names of the relevant options into an @@ -254,8 +242,7 @@ <h2 id="incorporating-command-line-options-into-the-configuration-file">Incorpor "tutorials": "path/to/tutorials", // same as -u path/to/tutorials } } -</code></pre> - </figure> +</code></pre></figure> <p>By using the <code>source.include</code> and <code>opts</code> options, you can put almost all of the arguments to JSDoc in a configuration file, so that the command line reduces to:</p> <pre class="prettyprint"><code>jsdoc -c /path/to/conf.json @@ -269,8 +256,7 @@ <h2 id="configuring-tags-and-tag-dictionaries">Configuring tags and tag dictiona "dictionaries": ["jsdoc","closure"] } } -</code></pre> - </figure> +</code></pre></figure> <p>The <code>tags.allowUnknownTags</code> property affects how JSDoc handles unrecognized tags. If you set this option to <code>false</code>, and JSDoc finds a tag that it does not recognize (for example, <code>@foo</code>), JSDoc logs a warning. By default, this option is set to <code>true</code>. In JSDoc 3.4.1 and later, you can also set this property to an array of tag names that JSDoc should allow (for example, <code>["foo","bar"]</code>).</p> @@ -296,8 +282,7 @@ <h2 id="configuring-templates">Configuring templates</h2> "monospaceLinks": false } } -</code></pre> - </figure> +</code></pre></figure> <p>If <code>templates.monospaceLinks</code> is true, all link text from the <a href="tags-inline-link.html">inline <code>{@link}</code> tag</a> will be rendered in monospace.</p> <p>If <code>templates.cleverLinks</code> is true, <code>{@link asdf}</code> will be rendered in normal font if <code>asdf</code> is a URL, and monospace otherwise. @@ -318,8 +303,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/about-getting-started.html b/about-getting-started.html index 6952842c..6783a0dd 100644 --- a/about-getting-started.html +++ b/about-getting-started.html @@ -47,8 +47,7 @@ <h2 id="adding-documentation-comments-to-your-code">Adding documentation comment <figcaption>The simplest documentation is just a description</figcaption><pre class="prettyprint lang-js"><code>/** This is a description of the foo function. */ function foo() { } -</code></pre> - </figure> +</code></pre></figure> <p>Adding a description is simple—just type the description you want in the documentation comment.</p> <p>Special "JSDoc tags" can be used to give more information. For example, if the function is a constructor for a class, you can indicate this by adding a <code>@constructor</code> tag.</p> @@ -59,8 +58,7 @@ <h2 id="adding-documentation-comments-to-your-code">Adding documentation comment */ function Book(title, author) { } -</code></pre> - </figure> +</code></pre></figure> <p>More tags can be used to add more information. See the <a href="index.html#block-tags">home page</a> for a complete list of tags that are recognized by JSDoc 3.</p> <figure> @@ -72,8 +70,7 @@ <h2 id="adding-documentation-comments-to-your-code">Adding documentation comment */ function Book(title, author) { } -</code></pre> - </figure> +</code></pre></figure> <h2 id="generating-a-website">Generating a website</h2> <p>Once your code is commented, you can use the JSDoc 3 tool to generate an HTML website from your source files.</p> <p>By default, JSDoc uses the built-in "default" template to turn the documentation into HTML. You can edit this template to suit your own needs or create @@ -81,14 +78,12 @@ <h2 id="generating-a-website">Generating a website</h2> </p> <figure> <figcaption>Running the documentation generator on the command line</figcaption><pre class="prettyprint"><code>jsdoc book.js -</code></pre> - </figure> +</code></pre></figure> <p>This command will create a directory named <code>out/</code> in the current working directory. Within that directory, you will find the generated HTML pages.</p> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/about-including-package.html b/about-including-package.html index 1db722cf..c0dd24b0 100644 --- a/about-including-package.html +++ b/about-including-package.html @@ -38,17 +38,14 @@ <h1>Including a Package File</h1> <h2 id="examples">Examples</h2> <figure> <figcaption>Including a package file in your source paths</figcaption><pre class="prettyprint"><code>jsdoc path/to/js path/to/package/package.json -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Using the -P/--package option</figcaption><pre class="prettyprint"><code>jsdoc --package path/to/package/package-docs.json path/to/js -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/about-including-readme.html b/about-including-readme.html index b06aafbd..e589ea57 100644 --- a/about-including-readme.html +++ b/about-including-readme.html @@ -35,17 +35,14 @@ <h1>Including a README File</h1> <h2 id="examples">Examples</h2> <figure> <figcaption>Including a README file in your source paths</figcaption><pre class="prettyprint"><code>jsdoc path/to/js path/to/readme/README.md -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Using the -R/--readme option</figcaption><pre class="prettyprint"><code>jsdoc --readme path/to/readme/README path/to/js -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/about-license-jsdoc3.html b/about-license-jsdoc3.html index 4c854302..6d508de3 100644 --- a/about-license-jsdoc3.html +++ b/about-license-jsdoc3.html @@ -30,8 +30,7 @@ <h1>License</h1> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/about-namepaths.html b/about-namepaths.html index 2dd77f95..46619b91 100644 --- a/about-namepaths.html +++ b/about-namepaths.html @@ -40,10 +40,9 @@ <h2 id="namepaths-in-jsdoc-3">Namepaths in JSDoc 3</h2> MyConstructor#instanceMember MyConstructor.staticMember MyConstructor~innerMember // note that JSDoc 2 uses a dash -</code></pre> - </figure> - <p>The example below shows: an <em>instance</em> method named "say," an <em>inner</em> function also named "say," and a <em>static</em> method - also named "say." These are three distinct methods that all exist independently of one another.</p> +</code></pre></figure> + <p>The example below shows: an <em>instance</em> method named <code>say</code>, an <em>inner</em> function also named <code>say</code>, and a <em>static</em> method + also named <code>say</code>. These are three distinct methods that all exist independently of one another.</p> <figure> <figcaption>Use a documentation tag to describe your code.</figcaption><pre class="prettyprint lang-js"><code>/** @constructor */ Person = function() { @@ -63,18 +62,16 @@ <h2 id="namepaths-in-jsdoc-3">Namepaths in JSDoc 3</h2> p.say(); // I'm an instance. Person.say(); // I'm static. // there is no way to directly access the inner function from here -</code></pre> - </figure> +</code></pre></figure> <p>You would use three different namepath syntaxes to refer to the three different methods:</p> <figure> <figcaption>Use a documentation tag to describe your code.</figcaption><pre class="prettyprint"><code>Person#say // the instance method named "say." Person.say // the static method named "say." Person~say // the inner method named "say." -</code></pre> - </figure> +</code></pre></figure> <p>You might wonder why there is a syntax to refer to an inner method when that method isn't directly accessible from outside the function it is defined in. - While that is true, and thus the "~" syntax is rarely used, it <em>is</em> possible to return a reference to an inner method from another method - inside that container, so it is possible that some object elsewhere in your code might borrow an inner method.</p> + While that is true, and thus the <code>~</code> syntax is rarely used, it _is_ possible to return a reference to an inner method from another method inside + that container, so it is possible that some object elsewhere in your code might borrow an inner method.</p> <p>Note that if a constructor has an instance member that is also a constructor, you can simply chain the namepaths together to form a longer namepath:</p> <figure> <figcaption>Use a documentation tag to describe your code.</figcaption><pre class="prettyprint lang-js"><code>/** @constructor */ @@ -90,13 +87,10 @@ <h2 id="namepaths-in-jsdoc-3">Namepaths in JSDoc 3</h2> var p = new Person(); var i = new p.Idea(); i.consider(); -</code></pre> - </figure> - <p>In this case, to refer to the method named "consider," you would use the following namepath: - <code>Person#Idea#consider</code> - </p> - <p>This chaining can be used with any combination of the connecting symbols: <code># . ~</code> - </p> +</code></pre></figure> + <p>In this case, to refer to the method named <code>consider</code>, you would use the following namepath: + <code>Person#Idea#consider</code></p> + <p>This chaining can be used with any combination of the connecting symbols: <code># . ~</code></p> <figure> <figcaption>Special cases: modules, externals and events.</figcaption><pre class="prettyprint lang-js"><code>/** A module. Its name is module:foo/bar. * @module foo/bar @@ -107,9 +101,8 @@ <h2 id="namepaths-in-jsdoc-3">Namepaths in JSDoc 3</h2> /** An event. Its name is module:foo/bar.event:MyEvent. * @event module:foo/bar.event:MyEvent */ -</code></pre> - </figure> - <p>There are some special cases with namepaths: <a href="tags-module.html">@module</a> names are prefixed by "module:", <a href="tags-external.html">@external</a> names are prefixed by "external:", and <a href="tags-event.html">@event</a> names are prefixed by "event:".</p> +</code></pre></figure> + <p>There are some special cases with namepaths: <a href="tags-module.html"><code>@module</code></a> names are prefixed by <code>module:</code>, <a href="tags-external.html"><code>@external</code></a> names are prefixed by <code>external:</code>, and <a href="tags-event.html"><code>@event</code></a> names are prefixed by <code>event:</code>.</p> <figure> <figcaption>Namepaths of objects with special characters in the name.</figcaption><pre class="prettyprint lang-js"><code>/** @namespace */ var chat = { @@ -136,11 +129,10 @@ <h2 id="namepaths-in-jsdoc-3">Namepaths in JSDoc 3</h2> * Now we define an event in our {@link chat."#channel"} namespace. * @event chat."#channel"."op:announce-motd" */ -</code></pre> - </figure> +</code></pre></figure> <p>Above is an example of a namespace with "unusual" characters in its member names (the hash character, dashes, even quotes). To refer to these you just - need quote the names: chat."#channel", chat."#channel"."op:announce-motd", and so on. Internal quotes in names should be escaped - with backslashes: chat."#channel"."say-\"hello\"".</p> + need quote the names: <code>chat."#channel"</code>, <code>chat."#channel"."op:announce-motd"</code>, and so on. Internal quotes + in names should be escaped with backslashes: <code>chat."#channel"."say-\"hello\""</code>.</p> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -153,8 +145,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/about-plugins.html b/about-plugins.html index 78138f61..8ffa9d12 100644 --- a/about-plugins.html +++ b/about-plugins.html @@ -58,8 +58,7 @@ <h2 id="creating-and-enabling-a-plugin">Creating and Enabling a Plugin</h2> <figcaption>Adding a plugin to JSDoc's configuration file</figcaption><pre class="prettyprint lang-json"><code>{ "plugins": ["plugins/shout"] } -</code></pre> - </figure> +</code></pre></figure> <p>JSDoc executes plugins in the order that they are listed in the configuration file.</p> <h2 id="authoring-jsdoc-3-plugins">Authoring JSDoc 3 Plugins</h2> <p>JSDoc 3's plugin system offers extensive control over the parsing process. A plugin can affect the parse results by doing any of the following:</p> @@ -77,12 +76,11 @@ <h3 id="event-handlers">Event Handlers</h3> // Do something when we see a new doclet } }; -</code></pre> - </figure> +</code></pre></figure> <p>JSDoc fires events in the same order as the underlying code.</p> <p>An event-handler plugin can stop later plugins from running by setting a <code>stopPropagation</code> property on the event object (<code>e.stopPropagation = true</code>). A plugin can stop the event from firing by setting a <code>preventDefault</code> property (<code>e.preventDefault = true</code>).</p> - <h4 id="event-parsebegin">Event: parseBegin</h4> + <h4 id="event-parsebegin">Event: <code>parseBegin</code></h4> <p>The <code>parseBegin</code> event is fired before JSDoc starts loading and parsing the source files. Your plugin can control which files JSDoc will parse by modifying the event's contents.</p> <p><strong>Note</strong>: This event is fired in JSDoc 3.2 and later.</p> @@ -90,13 +88,13 @@ <h4 id="event-parsebegin">Event: parseBegin</h4> <ul> <li><code>sourcefiles</code>: An array of paths to source files that will be parsed.</li> </ul> - <h4 id="event-filebegin">Event: fileBegin</h4> + <h4 id="event-filebegin">Event: <code>fileBegin</code></h4> <p>The <code>fileBegin</code> event is fired when the parser is about to parse a file. Your plugin can use this event to trigger per-file initialization if necessary.</p> <p>The event object contains the following properties:</p> <ul> <li><code>filename</code>: The name of the file.</li> </ul> - <h4 id="event-beforeparse">Event: beforeParse</h4> + <h4 id="event-beforeparse">Event: <code>beforeParse</code></h4> <p>The <code>beforeParse</code> event is fired before parsing has begun. Plugins can use this method to modify the source code that will be parsed. For instance, your plugin could add a JSDoc comment, or it could remove preprocessing tags that are not valid JavaScript.</p> <p>The event object contains the following properties:</p> @@ -120,9 +118,8 @@ <h4 id="event-beforeparse">Event: beforeParse</h4> e.source += extraDoc.join('\n'); } }; -</code></pre> - </figure> - <h4 id="event-jsdoccommentfound">Event: jsdocCommentFound</h4> +</code></pre></figure> + <h4 id="event-jsdoccommentfound">Event: <code>jsdocCommentFound</code></h4> <p>The <code>jsdocCommentFound</code> event is fired whenever a JSDoc comment is found. The comment may or may not be associated with any code. You might use this event to modify the contents of a comment before it is processed.</p> <p>The event object contains the following properties:</p> @@ -132,7 +129,7 @@ <h4 id="event-jsdoccommentfound">Event: jsdocCommentFound</h4> <li><code>lineno</code>: The line number on which the comment was found.</li> <li><code>columnno</code>: The column number on which the comment was found. Available in JSDoc 3.5.0 and later.</li> </ul> - <h4 id="event-symbolfound">Event: symbolFound</h4> + <h4 id="event-symbolfound">Event: <code>symbolFound</code></h4> <p>The <code>symbolFound</code> event is fired when the parser comes across a symbol in the code that may need to be documented. For example, the parser fires a <code>symbolFound</code> event for each variable, function, and object literal in a source file.</p> <p>The event object contains the following properties:</p> @@ -148,7 +145,7 @@ <h4 id="event-symbolfound">Event: symbolFound</h4> <code>type</code>, and <code>node</code> properties. The object might also have <code>value</code>, <code>paramnames</code>, or <code>funcscope</code> properties depending on the symbol.</li> </ul> - <h4 id="event-newdoclet">Event: newDoclet</h4> + <h4 id="event-newdoclet">Event: <code>newDoclet</code></h4> <p>The <code>newDoclet</code> event is the highest-level event. It is fired when a new doclet has been created. This means that a JSDoc comment or a symbol has been processed, and the actual doclet that will be passed to the template has been created.</p> <p>The event object contains the following properties:</p> @@ -186,16 +183,15 @@ <h4 id="event-newdoclet">Event: newDoclet</h4> } } }; -</code></pre> - </figure> - <h4 id="event-filecomplete">Event: fileComplete</h4> +</code></pre></figure> + <h4 id="event-filecomplete">Event: <code>fileComplete</code></h4> <p>The <code>fileComplete</code> event is fired when the parser has finished parsing a file. Your plugin could use this event to trigger per-file cleanup.</p> <p>The event object contains the following properties:</p> <ul> <li><code>filename</code>: The name of the file.</li> <li><code>source</code>: The contents of the file.</li> </ul> - <h4 id="event-parsecomplete">Event: parseComplete</h4> + <h4 id="event-parsecomplete">Event: <code>parseComplete</code></h4> <p>The <code>parseComplete</code> event is fired after JSDoc has parsed all of the specified source files.</p> <p><strong>Note</strong>: This event is fired in JSDoc 3.2 and later.</p> <p>The event object contains the following properties:</p> @@ -204,7 +200,7 @@ <h4 id="event-parsecomplete">Event: parseComplete</h4> <li><code>doclets</code>: An array of doclet objects. See the <a href="#event-newdoclet"><code>newDoclet</code> event</a> for details about the properties that each doclet can contain. Available in JSDoc 3.2.1 and later.</li> </ul> - <h4 id="event-processingcomplete">Event: processingComplete</h4> + <h4 id="event-processingcomplete">Event: <code>processingComplete</code></h4> <p>The <code>processingComplete</code> event is fired after JSDoc updates the parse results to reflect inherited and borrowed symbols.</p> <p><strong>Note</strong>: This event is fired in JSDoc 3.2.1 and later.</p> <p>The event object contains the following properties:</p> @@ -221,8 +217,7 @@ <h3 id="tag-definitions">Tag Definitions</h3> <figcaption>Example</figcaption><pre class="prettyprint lang-js"><code>exports.defineTags = function(dictionary) { // define tags here }; -</code></pre> - </figure> +</code></pre></figure> <h4 id="the-dictionary">The Dictionary</h4> <p>The dictionary provides the following methods:</p> <ul> @@ -258,14 +253,12 @@ <h4 id="the-dictionary">The Dictionary</h4> doclet.scope = "instance"; } }); -</code></pre> - </figure> +</code></pre></figure> <p>The <code>defineTag</code> method returns a <code>Tag</code> object, which has a <code>synonym</code> method that can be used to declare a synonym for the tag.</p> <figure> <figcaption>Defining a tag synonym</figcaption><pre class="prettyprint lang-js"><code>dictionary.defineTag('exception', { /* options for exception tag */ }) .synonym('throws'); -</code></pre> - </figure> +</code></pre></figure> <h3 id="node-visitors">Node Visitors</h3> <p>At the lowest level, plugin authors can process each node in the abstract syntax tree (AST) by defining a node visitor that will visit each node. By using a node-visitor plugin, you can modify comments and trigger parser events for any arbitrary piece of code.</p> @@ -277,8 +270,7 @@ <h3 id="node-visitors">Node Visitors</h3> // do all sorts of crazy things here } }; -</code></pre> - </figure> +</code></pre></figure> <p>The function is called on each node with the following parameters:</p> <ul> <li><code>node</code>: The AST node. AST nodes are JavaScript objects that use the format defined by the <a href="https://github.com/estree/estree">ESTree @@ -319,13 +311,11 @@ <h2 id="reporting-errors">Reporting Errors</h2> } } }; -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/about-tutorials.html b/about-tutorials.html index 2f84d0ee..fb7d08c2 100644 --- a/about-tutorials.html +++ b/about-tutorials.html @@ -51,14 +51,11 @@ <h2 id="adding-tutorials">Adding tutorials</h2> </code></pre> <p>JSDoc searches the tutorials directory for files with the following extensions:</p> <ul> - <li><code>.htm</code> - </li> - <li><code>.html</code> - </li> + <li><code>.htm</code></li> + <li><code>.html</code></li> <li><code>.markdown</code> (converted from Markdown to HTML)</li> <li><code>.md</code> (converted from Markdown to HTML)</li> - <li><code>.xhtml</code> - </li> + <li><code>.xhtml</code></li> <li><code>.xml</code> (treated as HTML)</li> </ul> <p>JSDoc also searches for JSON files that contain information about the titles, ordering, and hierarchy of your tutorials, as discussed in the following section.</p> @@ -95,8 +92,7 @@ <h2 id="configuring-titles-order-and-hierarchy">Configuring titles, order, and h "title": "Tutorial Two" } } -</code></pre> - </li> +</code></pre></li> <li> <p>A top-level object whose properties are all tutorial objects, with child tutorials listed by name in an array. For example, if <code>tutorial1</code> has two children, <code>childA</code> and <code>childB</code>, and <code>tutorial2</code> is at the same level as <code>tutorial1</code> and has no children:</p> @@ -115,8 +111,7 @@ <h2 id="configuring-titles-order-and-hierarchy">Configuring titles, order, and h "title": "Child B" } } -</code></pre> - </li> +</code></pre></li> </ol> <p>You can also provide an individual <code>.json</code> file for each tutorial, using the tutorial identifier as the filename. This method is deprecated and should not be used for new projects.</p> @@ -133,8 +128,7 @@ <h3 id="-tutorial-block-tag">@tutorial block tag</h3> * @tutorial socket-tutorial */ function Socket() {} -</code></pre> - </figure> +</code></pre></figure> <h3 id="-tutorial-inline-tag">{@tutorial} inline tag</h3> <p>You can also use the <a href="tags-inline-tutorial.html"><code>{@tutorial}</code> inline tag</a> to link to a tutorial within the text of another tag. By default, JSDoc will use the tutorial's title as the link text.</p> @@ -146,13 +140,11 @@ <h3 id="-tutorial-inline-tag">{@tutorial} inline tag</h3> * @class */ function Socket() {} -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/content/en/about-commandline.md b/content/en/about-commandline.md index 7c64f60c..2cadab09 100644 --- a/content/en/about-commandline.md +++ b/content/en/about-commandline.md @@ -11,8 +11,8 @@ At its most basic level, JSDoc is used like so: where `...` are paths to other files to generate documentation for. -Additionally, one may provide the path to a [Markdown file][md-file] (ending in ".md") or a file -named "README", and this will be added to the documentation on the front page. See [these +Additionally, one may provide the path to a [Markdown file][md-file] (ending in `.md`) or a file +named `README`, and this will be added to the documentation on the front page. See [these instructions][including-readme]. JSDoc supports a number of command-line options, many of which have both long and short forms. diff --git a/content/en/about-configuring-jsdoc.md b/content/en/about-configuring-jsdoc.md index b2e195c5..a88b9f9f 100644 --- a/content/en/about-configuring-jsdoc.md +++ b/content/en/about-configuring-jsdoc.md @@ -177,7 +177,7 @@ use the [`-r` command-line option][about-commandline] to recurse into subdirecto this array may include subdirectories of the paths in `source.include`. + `source.includePattern`: An optional string, interpreted as a regular expression. If present, all filenames must match this regular expression to be processed by JSDoc. By default, this option is -set to ".+\.js(doc|x)?$", meaning that only files with the extensions `.js`, `.jsdoc`, and +set to `.+\.js(doc|x)?$`, meaning that only files with the extensions `.js`, `.jsdoc`, and `.jsx` will be processed. + `source.excludePattern`: An optional string, interpreted as a regular expression. If present, any file matching this regular expression will be ignored. By default, this option is set so that files diff --git a/content/en/about-namepaths.md b/content/en/about-namepaths.md index d42b6ade..2402e5c7 100644 --- a/content/en/about-namepaths.md +++ b/content/en/about-namepaths.md @@ -21,7 +21,7 @@ MyConstructor~innerMember // note that JSDoc 2 uses a dash ``` {% endexample %} -The example below shows: an _instance_ method named "say," an _inner_ function also named "say," and a _static_ method also named "say." These are three distinct methods that all exist independently of one another. +The example below shows: an _instance_ method named `say`, an _inner_ function also named `say`, and a _static_ method also named `say`. These are three distinct methods that all exist independently of one another. {% example "Use a documentation tag to describe your code." %} @@ -58,7 +58,7 @@ Person~say // the inner method named "say." ``` {% endexample %} -You might wonder why there is a syntax to refer to an inner method when that method isn't directly accessible from outside the function it is defined in. While that is true, and thus the "~" syntax is rarely used, it _is_ possible to return a reference to an inner method from another method inside that container, so it is possible that some object elsewhere in your code might borrow an inner method. +You might wonder why there is a syntax to refer to an inner method when that method isn't directly accessible from outside the function it is defined in. While that is true, and thus the `~` syntax is rarely used, it _is_ possible to return a reference to an inner method from another method inside that container, so it is possible that some object elsewhere in your code might borrow an inner method. Note that if a constructor has an instance member that is also a constructor, you can simply chain the namepaths together to form a longer namepath: @@ -81,7 +81,7 @@ i.consider(); ``` {% endexample %} -In this case, to refer to the method named "consider," you would use the following namepath: +In this case, to refer to the method named `consider`, you would use the following namepath: `Person#Idea#consider` @@ -102,7 +102,7 @@ This chaining can be used with any combination of the connecting symbols: `# . ~ ``` {% endexample %} -There are some special cases with namepaths: [@module][module-tag] names are prefixed by "module:", [@external][external-tag] names are prefixed by "external:", and [@event][event-tag] names are prefixed by "event:". +There are some special cases with namepaths: [`@module`][module-tag] names are prefixed by `module:`, [`@external`][external-tag] names are prefixed by `external:`, and [`@event`][event-tag] names are prefixed by `event:`. {% example "Namepaths of objects with special characters in the name." %} @@ -136,8 +136,8 @@ var chat = { {% endexample %} Above is an example of a namespace with "unusual" characters in its member names (the hash character, dashes, even quotes). -To refer to these you just need quote the names: chat."#channel", chat."#channel"."op:announce-motd", and so on. -Internal quotes in names should be escaped with backslashes: chat."#channel"."say-\"hello\"". +To refer to these you just need quote the names: `chat."#channel"`, `chat."#channel"."op:announce-motd"`, and so on. +Internal quotes in names should be escaped with backslashes: `chat."#channel"."say-\"hello\""`. [event-tag]: tags-event.html [external-tag]: tags-external.html diff --git a/content/en/about-plugins.md b/content/en/about-plugins.md index 20723f7c..0f5fc102 100644 --- a/content/en/about-plugins.md +++ b/content/en/about-plugins.md @@ -63,7 +63,7 @@ An event-handler plugin can stop later plugins from running by setting a `stopPr on the event object (`e.stopPropagation = true`). A plugin can stop the event from firing by setting a `preventDefault` property (`e.preventDefault = true`). -#### Event: parseBegin +#### Event: `parseBegin` The `parseBegin` event is fired before JSDoc starts loading and parsing the source files. Your plugin can control which files JSDoc will parse by modifying the event's contents. @@ -74,7 +74,7 @@ The event object contains the following properties: + `sourcefiles`: An array of paths to source files that will be parsed. -#### Event: fileBegin +#### Event: `fileBegin` The `fileBegin` event is fired when the parser is about to parse a file. Your plugin can use this event to trigger per-file initialization if necessary. @@ -83,7 +83,7 @@ The event object contains the following properties: + `filename`: The name of the file. -#### Event: beforeParse +#### Event: `beforeParse` The `beforeParse` event is fired before parsing has begun. Plugins can use this method to modify the source code that will be parsed. For instance, your plugin could add a JSDoc comment, or it could @@ -118,7 +118,7 @@ exports.handlers = { ``` {% endexample %} -#### Event: jsdocCommentFound +#### Event: `jsdocCommentFound` The `jsdocCommentFound` event is fired whenever a JSDoc comment is found. The comment may or may not be associated with any code. You might use this event to modify the contents of a comment before it @@ -131,7 +131,7 @@ The event object contains the following properties: + `lineno`: The line number on which the comment was found. + `columnno`: The column number on which the comment was found. Available in JSDoc 3.5.0 and later. -#### Event: symbolFound +#### Event: `symbolFound` The `symbolFound` event is fired when the parser comes across a symbol in the code that may need to be documented. For example, the parser fires a `symbolFound` event for each variable, function, and @@ -153,7 +153,7 @@ properties depending on the symbol. [node-visitors]: #node-visitors -#### Event: newDoclet +#### Event: `newDoclet` The `newDoclet` event is the highest-level event. It is fired when a new doclet has been created. This means that a JSDoc comment or a symbol has been processed, and the actual doclet that will be @@ -206,7 +206,7 @@ exports.handlers = { [about-commandline]: about-commandline.html -#### Event: fileComplete +#### Event: `fileComplete` The `fileComplete` event is fired when the parser has finished parsing a file. Your plugin could use this event to trigger per-file cleanup. @@ -216,7 +216,7 @@ The event object contains the following properties: + `filename`: The name of the file. + `source`: The contents of the file. -#### Event: parseComplete +#### Event: `parseComplete` The `parseComplete` event is fired after JSDoc has parsed all of the specified source files. @@ -230,7 +230,7 @@ about the properties that each doclet can contain. Available in JSDoc 3.2.1 and [newdoclet-event]: #event-newdoclet -#### Event: processingComplete +#### Event: `processingComplete` The `processingComplete` event is fired after JSDoc updates the parse results to reflect inherited and borrowed symbols. diff --git a/content/en/tags-abstract.md b/content/en/tags-abstract.md index e6ca5064..d27235b0 100644 --- a/content/en/tags-abstract.md +++ b/content/en/tags-abstract.md @@ -7,7 +7,7 @@ synonyms: ## Overview -The @abstract tag identifies members that must be implemented (or overridden) by objects that +The `@abstract` tag identifies members that must be implemented (or overridden) by objects that inherit the member. ## Example diff --git a/content/en/tags-alias.md b/content/en/tags-alias.md index fee597f5..bf7898ba 100644 --- a/content/en/tags-alias.md +++ b/content/en/tags-alias.md @@ -13,12 +13,12 @@ related: ## Overview -The @alias tag causes JSDoc to treat all references to a member as if the member had a different +The `@alias` tag causes JSDoc to treat all references to a member as if the member had a different name. This tag is especially useful if you define a class within an inner function; in this case, -you can use the @alias tag to tell JSDoc how the class is exposed in your app. +you can use the `@alias` tag to tell JSDoc how the class is exposed in your app. -While the @alias tag may sound similar to the @name tag, these tags behave very differently. The -@name tag tells JSDoc to ignore any code associated with the comment. For example, when JSDoc +While the `@alias` tag may sound similar to the `@name` tag, these tags behave very differently. The +`@name` tag tells JSDoc to ignore any code associated with the comment. For example, when JSDoc processes the following code, it ignores the fact that the comment for `bar` is attached to a function: @@ -30,7 +30,7 @@ function: function foo() {} ``` -The @alias tag tells JSDoc to pretend that Member A is actually named Member B. For example, when +The `@alias` tag tells JSDoc to pretend that <var>Member A</var> is actually named <var>Member B</var>. For example, when JSDoc processes the following code, it recognizes that `foo` is a function, then renames `foo` to `bar` in the documentation: @@ -48,12 +48,12 @@ function foo() {} ## Examples Suppose you are using a class framework that expects you to pass in a constructor function when you -define a class. You can use the @alias tag to tell JSDoc how the class will be exposed in your app. +define a class. You can use the `@alias` tag to tell JSDoc how the class will be exposed in your app. -In the following example, the @alias tag tells JSDoc to treat the anonymous function as if it were -the constructor for the class "trackr.CookieManager". Within the function, JSDoc interprets the -`this` keyword relative to trackr.CookieManager, so the "value" method has the namepath -"trackr.CookieManager#value". +In the following example, the `@alias` tag tells JSDoc to treat the anonymous function as if it were +the constructor for the class `trackr.CookieManager`. Within the function, JSDoc interprets the +`this` keyword relative to `trackr.CookieManager`, so the `value` method has the namepath +`trackr.CookieManager#value`. {% example "Using @alias with an anonymous constructor function" %} @@ -74,8 +74,8 @@ Klass('trackr.CookieManager', ``` {% endexample %} -You can also use the @alias tag with members that are created within an immediately invoked function -expression (IIFE). The @alias tag tells JSDoc that these members are exposed outside of the IIFE's +You can also use the `@alias` tag with members that are created within an immediately invoked function +expression (IIFE). The `@alias` tag tells JSDoc that these members are exposed outside of the IIFE's scope. {% example "Using @alias for static members of a namespace" %} @@ -99,8 +99,8 @@ var Apple = {}; ``` {% endexample %} -For members that are defined within an object literal, you can use the @alias tag as an alternative -to the [@lends][lends-tag] tag. +For members that are defined within an object literal, you can use the `@alias` tag as an alternative +to the [`@lends`][lends-tag] tag. {% example "Using @alias for an object literal" %} diff --git a/content/en/tags-author.md b/content/en/tags-author.md index 91d7c8b1..f6c7e2b1 100644 --- a/content/en/tags-author.md +++ b/content/en/tags-author.md @@ -13,7 +13,7 @@ related: ## Overview -The @author tag identifies the author of an item. In JSDoc 3.2 and later, if the author's name is +The `@author` tag identifies the author of an item. In JSDoc 3.2 and later, if the author's name is followed by an email address enclosed in angle brackets, the default template will convert the email address to a `mailto:` link. diff --git a/content/en/tags-borrows.md b/content/en/tags-borrows.md index dd25fe0d..0018b1dc 100644 --- a/content/en/tags-borrows.md +++ b/content/en/tags-borrows.md @@ -10,7 +10,7 @@ description: This object uses something from another object. ## Overview -The @borrows tag allows you to add documentation for another symbol to your documentation. +The `@borrows` tag allows you to add documentation for another symbol to your documentation. This tag would be useful if you had more than one way to reference a function, but you didn't want to duplicate the same documentation in two places. @@ -18,7 +18,7 @@ to duplicate the same documentation in two places. ## Examples -In this example there exists documentation for the "trstr" function, but "util.trim" is just a +In this example there exists documentation for the `trstr` function, but `util.trim` is just a reference to that same function by a different name. {% example "Duplicate the documentation for trstr as util.trim" %} diff --git a/content/en/tags-callback.md b/content/en/tags-callback.md index 74c24a9e..2d59c071 100644 --- a/content/en/tags-callback.md +++ b/content/en/tags-callback.md @@ -13,12 +13,12 @@ related: ## Overview -The @callback tag provides information about a callback function that can be passed to other +The `@callback` tag provides information about a callback function that can be passed to other functions, including the callback's parameters and return value. You can include any of the tags -that you can provide for a @method. +that you can provide for a `@method`. Once you define a callback, you can use it in the same way as a custom type defined with the -@typedef tag. In particular, you can use the callback's name as a type name. This allows you to +`@typedef` tag. In particular, you can use the callback's name as a type name. This allows you to indicate that a function parameter should contain a certain type of callback. If you want a callback to be displayed with the type definitions for a specific class, you can give diff --git a/content/en/tags-class.md b/content/en/tags-class.md index 7899720e..4d524792 100644 --- a/content/en/tags-class.md +++ b/content/en/tags-class.md @@ -14,7 +14,7 @@ related: ## Overview -The @class tag marks a function as being a constructor, meant to be called with the new +The `@class` tag marks a function as being a constructor, meant to be called with the `new` keyword to return an instance. diff --git a/content/en/tags-classdesc.md b/content/en/tags-classdesc.md index 2cd74d69..f461388f 100644 --- a/content/en/tags-classdesc.md +++ b/content/en/tags-classdesc.md @@ -13,13 +13,13 @@ related: ## Overview -The @classdesc tag is used to provide a description for a class, separate from the constructor -function's description. Use the @classdesc tag in combination with the [@class (or @constructor) +The `@classdesc` tag is used to provide a description for a class, separate from the constructor +function's description. Use the `@classdesc` tag in combination with the [`@class` (or `@constructor`) tag][class-tag]. -The functionality of the @classdesc tag in JSDoc 3 duplicates that of the @class in previous -versions. As of version 3, the syntax and functionality of the @class tag now exactly matches the -@constructor tag, and the @classdesc tag more explicitly communicates its purpose: to document a +The functionality of the `@classdesc` tag in JSDoc 3 duplicates that of the `@class` in previous +versions. As of version 3, the syntax and functionality of the `@class` tag now exactly matches the +`@constructor` tag, and the `@classdesc` tag more explicitly communicates its purpose: to document a class's description. [class-tag]: tags-class.html diff --git a/content/en/tags-constant.md b/content/en/tags-constant.md index 2dbed596..3a3af0d4 100644 --- a/content/en/tags-constant.md +++ b/content/en/tags-constant.md @@ -15,14 +15,14 @@ related: ## Overview -The @constant tag is used to mark the documentation as belonging to a symbol that is a constant. +The `@constant` tag is used to mark the documentation as belonging to a symbol that is a constant. ## Examples In this example we are documenting a string constant. Note that although the code is using the `const` keyword, this is not required by JSDoc. If your JavaScript host environment doesn't yet -support constant declarations, the @const documentation can just as effectively be used on `var` +support constant declarations, the `@const` documentation can just as effectively be used on `var` declarations. {% example "A string constant representing the color red" %} @@ -39,6 +39,6 @@ var ONE = 1; ``` {% endexample %} -Note that the example provides the type in a @type tag. This is optional. Also the optional -@default tag is used here too, this will automatically add whatever the assigned value is (for -example 'FF0000') to the documentation. +Note that the example provides the type in a `@type` tag. This is optional. Also the optional +`@default` tag is used here too, this will automatically add whatever the assigned value is (for +example `'FF0000'`) to the documentation. diff --git a/content/en/tags-copyright.md b/content/en/tags-copyright.md index c9323d7a..2a822a37 100644 --- a/content/en/tags-copyright.md +++ b/content/en/tags-copyright.md @@ -12,8 +12,8 @@ related: ## Overview -The @copyright tag is used to document copyright information in a file overview comment. Use this -tag in combination with the [@file tag][file-tag]. +The `@copyright` tag is used to document copyright information in a file overview comment. Use this +tag in combination with the [`@file` tag][file-tag]. [file-tag]: tags-file.html diff --git a/content/en/tags-default.md b/content/en/tags-default.md index e23b343d..e9bd6ec7 100644 --- a/content/en/tags-default.md +++ b/content/en/tags-default.md @@ -12,7 +12,7 @@ synonyms: ## Overview -The @default tag allows you to document the assigned value of a symbol. You can supply this tag with +The `@default` tag allows you to document the assigned value of a symbol. You can supply this tag with a value yourself or you can allow JSDoc to automatically document the value from the source code -- only possible when the documented symbol is being assigned a single, simple value that is either: a string, a number, a boolean or null. @@ -21,7 +21,7 @@ string, a number, a boolean or null. ## Examples In this example a constant is documented. The value of the constant is `0xff0000`. By adding the -@default tag this value is automatically added to the documentation. +`@default` tag this value is automatically added to the documentation. {% example "Document the number value of a constant" %} diff --git a/content/en/tags-deprecated.md b/content/en/tags-deprecated.md index d5756530..a8cf8a7e 100644 --- a/content/en/tags-deprecated.md +++ b/content/en/tags-deprecated.md @@ -10,11 +10,11 @@ description: Document that this is no longer the preferred way. ## Overview -The @deprecated tag marks a symbol in your code as being deprecated. +The `@deprecated` tag marks a symbol in your code as being deprecated. ## Examples -You can use the @deprecated tag by itself, or include some text that describes more about the +You can use the `@deprecated` tag by itself, or include some text that describes more about the deprecation. {% example "Document that the old function has been deprecated since version 2.0" %} diff --git a/content/en/tags-description.md b/content/en/tags-description.md index 683a1f2c..553d8bc3 100644 --- a/content/en/tags-description.md +++ b/content/en/tags-description.md @@ -15,7 +15,7 @@ related: ## Overview -The @description tag allows you to provide a general description of the symbol you are documenting. +The `@description` tag allows you to provide a general description of the symbol you are documenting. The description may include HTML markup. It may also include Markdown formatting if the [Markdown plugin][markdown-plugin] is enabled. @@ -25,7 +25,7 @@ The description may include HTML markup. It may also include Markdown formatting ## Examples If you describe a symbol at the very beginning of a JSDoc comment, before using any block tags, you -may omit the @description tag. +may omit the `@description` tag. {% example "Describing a symbol without the @description tag" %} @@ -42,7 +42,7 @@ function add(a, b) { ``` {% endexample %} -By using the @description tag, you can place the description anywhere in the JSDoc comment. +By using the `@description` tag, you can place the description anywhere in the JSDoc comment. {% example "Describing a symbol with the @description tag" %} @@ -59,4 +59,4 @@ function add(a, b) { ``` {% endexample %} -If there's both a description at the beginning of a JSDoc comment and a description provided with the @description tag, the description specified with the @description will override the description at the beginning of the comment. +If there's both a description at the beginning of a JSDoc comment and a description provided with the `@description` tag, the description specified with the `@description` will override the description at the beginning of the comment. diff --git a/content/en/tags-enum.md b/content/en/tags-enum.md index c066904e..84d380c0 100644 --- a/content/en/tags-enum.md +++ b/content/en/tags-enum.md @@ -12,18 +12,18 @@ related: ## Overview -The @enum tag documents a collection of static properties whose values are all of the same type. +The `@enum` tag documents a collection of static properties whose values are all of the same type. An enum is similar a collection of properties, except that an enum is documented in its own doc comment, whereas properties are documented within the doc comment of their container. Often this tag -is used with @readonly, as an enum typically represents a collection of constants. +is used with `@readonly`, as an enum typically represents a collection of constants. ## Examples This shows how to document an object that represents a value with three possible states. Note that the enum members can have optional descriptions added if you wish. Also you can override the type, -as is shown with "MAYBE" -- by default enum members will be documented with the same type as the +as is shown with `MAYBE` -- by default enum members will be documented with the same type as the enum itself. {% example "A numeric enum, representing three states" %} diff --git a/content/en/tags-event.md b/content/en/tags-event.md index b202f1c6..745cb180 100644 --- a/content/en/tags-event.md +++ b/content/en/tags-event.md @@ -13,19 +13,19 @@ related: ## Overview -The @event tag allows you to document an event that can be fired. A typical event is represented by +The `@event` tag allows you to document an event that can be fired. A typical event is represented by an object with a defined set of properties. -Once you have used the @event tag to define a specific type of event, you can use the @fires tag to -indicate that a method can fire that event. You can also use the @listens tag to indicate that a +Once you have used the `@event` tag to define a specific type of event, you can use the `@fires` tag to +indicate that a method can fire that event. You can also use the `@listens` tag to indicate that a symbol listens for the event. JSDoc automatically prepends the namespace `event:` to each event's name. In general, you must -include this namespace when you link to the event in another doclet. (The @fires tag is a notable +include this namespace when you link to the event in another doclet. (The `@fires` tag is a notable exception; it allows you to omit the namespace.) -**Note**: JSDoc 3 uses @event doclets to document the content of an event. In contrast, JSDoc -Toolkit 2 used @event doclets to identify a function that can be fired when an event of the same +**Note**: JSDoc 3 uses `@event` doclets to document the content of an event. In contrast, JSDoc +Toolkit 2 used `@event` doclets to identify a function that can be fired when an event of the same name occurs. diff --git a/content/en/tags-example.md b/content/en/tags-example.md index fd7e76a5..a877bcad 100644 --- a/content/en/tags-example.md +++ b/content/en/tags-example.md @@ -32,7 +32,7 @@ globalNS.method1 = function (a, b) { ``` {% endexample %} -Examples can also be captioned using `<caption></caption>` after the @example tag. +Examples can also be captioned using `<caption></caption>` after the `@example` tag. {% example "Documenting examples with a caption" %} diff --git a/content/en/tags-exports.md b/content/en/tags-exports.md index c13b4679..14c9cca2 100644 --- a/content/en/tags-exports.md +++ b/content/en/tags-exports.md @@ -17,15 +17,15 @@ must omit this prefix. ## Overview -Use the @exports tag when documenting JavaScript modules that export anything other than the -"exports" object or the "module.exports" property. +Use the `@exports` tag when documenting JavaScript modules that export anything other than the +`exports` object or the `module.exports` property. ## Examples -In modules where you are using the special "exports" object, the @exports tag is never needed. JSDoc +In modules where you are using the special `exports` object, the `@exports` tag is never needed. JSDoc automatically recognizes that this object's members are being exported. Similarly, JSDoc -automatically recognizes the special "module.exports" property in Node.js modules. +automatically recognizes the special `module.exports` property in Node.js modules. {% example "CommonJS module" %} @@ -105,8 +105,8 @@ define(function() { ``` {% endexample %} -If your module exports an object named anything other than "exports" or "module.exports", use the -@exports tag to indicate what is being exported. +If your module exports an object named anything other than `exports` or `module.exports`, use the +`@exports` tag to indicate what is being exported. {% example "AMD module that exports an object" %} diff --git a/content/en/tags-file.md b/content/en/tags-file.md index bdfad692..1c6ff305 100644 --- a/content/en/tags-file.md +++ b/content/en/tags-file.md @@ -11,7 +11,7 @@ related: ## Overview -The @file tag provides a description for a file. Use the tag in a JSDoc comment at the beginning of +The `@file` tag provides a description for a file. Use the tag in a JSDoc comment at the beginning of the file. diff --git a/content/en/tags-fires.md b/content/en/tags-fires.md index af190395..90e693e1 100644 --- a/content/en/tags-fires.md +++ b/content/en/tags-fires.md @@ -15,8 +15,8 @@ related: ## Overview -The @fires tag indicates that a method can fire a specified type of event when it is called. Use the -[@event tag][event-tag] to document the event's content. +The `@fires` tag indicates that a method can fire a specified type of event when it is called. Use the +[`@event` tag][event-tag] to document the event's content. [event-tag]: tags-event.html diff --git a/content/en/tags-function.md b/content/en/tags-function.md index 0231186e..aaf1dc15 100644 --- a/content/en/tags-function.md +++ b/content/en/tags-function.md @@ -14,7 +14,7 @@ synonyms: ## Overview This marks an object as being a function, even though it may not appear to be one to the parser. It -sets the doclet's [@kind][kind-tag] to 'function'. +sets the doclet's [`@kind`][kind-tag] to `function`. [kind-tag]: tags-kind.html @@ -29,8 +29,8 @@ var paginate = paginateFactory(pages); ``` {% endexample %} -Without the @function tag, the `paginate` object would be documented as a generic object (a -[@member][member-tag]), because it isn't possible to tell from examining the line of code what type +Without the `@function` tag, the `paginate` object would be documented as a generic object (a +[`@member`][member-tag]), because it isn't possible to tell from examining the line of code what type of value `paginate` will hold when it is run. {% example "Using @function with a name." %} diff --git a/content/en/tags-global.md b/content/en/tags-global.md index e4c4bdec..600c65e6 100644 --- a/content/en/tags-global.md +++ b/content/en/tags-global.md @@ -10,14 +10,14 @@ related: ## Overview -The @global tag specifies that a symbol should appear in the documentation as a _global_ symbol. +The `@global` tag specifies that a symbol should appear in the documentation as a _global_ symbol. JSDoc ignores the symbol's actual scope within the source file. This tag is especially useful for symbols that are defined locally, then assigned to a global symbol. ## Examples -Use the @global tag to specify that a symbol should be documented as global. +Use the `@global` tag to specify that a symbol should be documented as global. {% example "Document an inner variable as a global" %} diff --git a/content/en/tags-inner.md b/content/en/tags-inner.md index ee982161..44f03b4f 100644 --- a/content/en/tags-inner.md +++ b/content/en/tags-inner.md @@ -9,10 +9,10 @@ related: ## Overview -Using the @inner tag will mark a symbol as an inner member of its parent symbol. This means it can -be referred to by "Parent~Child". +Using the `@inner` tag will mark a symbol as an inner member of its parent symbol. This means it can +be referred to by `Parent~Child`. -Using @inner will override a doclet's default scope (unless it is in the global scope, in which case +Using `@inner` will override a doclet's default scope (unless it is in the global scope, in which case it will remain global). @@ -31,8 +31,8 @@ it will remain global). ``` {% endexample %} -Note that in the above we could have used "@function MyNamespace~myFunction" instead of the -@memberof and @inner tags. +Note that in the above we could have used `@function MyNamespace~myFunction` instead of the +`@memberof` and `@inner` tags. {% example "Using @inner" %} diff --git a/content/en/tags-instance.md b/content/en/tags-instance.md index 24a4e186..b3e81a9a 100644 --- a/content/en/tags-instance.md +++ b/content/en/tags-instance.md @@ -9,16 +9,16 @@ related: ## Overview -Using the @instance tag will mark a symbol as an instance member of its parent symbol. This means it -can be referred to by "Parent#Child". +Using the `@instance` tag will mark a symbol as an instance member of its parent symbol. This means it +can be referred to by `Parent#Child`. -Using @instance will override a doclet's default scope (unless it is in the global scope, in which +Using `@instance` will override a doclet's default scope (unless it is in the global scope, in which case it will remain global). ## Examples -The following example is a longhand way of writing "@function MyNamespace#myFunction": +The following example is a longhand way of writing `@function MyNamespace#myFunction`: {% example "Using @instance to make a virtual doclet an instance member" %} @@ -33,7 +33,7 @@ The following example is a longhand way of writing "@function MyNamespace#myFunc ``` {% endexample %} -More usefully, you can use the @instance tag to override the scope that JSDoc infers. For example, +More usefully, you can use the `@instance` tag to override the scope that JSDoc infers. For example, you can indicate that a static member is used as an instance member: {% example "Using @instance to identify an instance member" %} diff --git a/content/en/tags-kind.md b/content/en/tags-kind.md index 52a917d7..91ea7541 100644 --- a/content/en/tags-kind.md +++ b/content/en/tags-kind.md @@ -11,27 +11,27 @@ related: where `<kindName>` is one of: -+ class -+ constant -+ event -+ external -+ file -+ function -+ member -+ mixin -+ module -+ namespace -+ typedef ++ `class` ++ `constant` ++ `event` ++ `external` ++ `file` ++ `function` ++ `member` ++ `mixin` ++ `module` ++ `namespace` ++ `typedef` ## Overview -The @kind tag is used to document what _kind_ of symbol is being documented (for example, a class or +The `@kind` tag is used to document what _kind_ of symbol is being documented (for example, a class or a module). The _kind_ of symbol differs from a symbol's _type_ (for example, string or boolean). -Usually you do not need the @kind tag, because the symbol's kind is determined by other tags in the -doclet. For example, using the @class tag automatically implies "@kind class", and using the -@namespace tag implies "@kind namespace". +Usually you do not need the `@kind` tag, because the symbol's kind is determined by other tags in the +doclet. For example, using the `@class` tag automatically implies `@kind class`, and using the +`@namespace` tag implies `@kind namespace`. ## Examples @@ -55,8 +55,8 @@ const asdf = 1; ``` {% endexample %} -In the case of tags with conflicting kinds (for example, using both @module, which sets the kind to -"module", and "@kind constant" which sets the kind to "constant"), the last tag determines the kind. +In the case of tags with conflicting kinds (for example, using both `@module`, which sets the kind to +`module`, and `@kind constant` which sets the kind to `constant`), the last tag determines the kind. {% example "Conflicting @kind statements" %} diff --git a/content/en/tags-member.md b/content/en/tags-member.md index 48fabc7c..7ea8faa9 100644 --- a/content/en/tags-member.md +++ b/content/en/tags-member.md @@ -11,8 +11,8 @@ synonyms: ## Overview -The @member tag identifies any member that does not have a more specialized kind, such as "class", -"function", or "constant". A member can optionally have a type as well as a name. +The `@member` tag identifies any member that does not have a more specialized kind, such as `class`, +`function`, or `constant`. A member can optionally have a type as well as a name. ## Examples @@ -28,7 +28,7 @@ function Data() { ``` {% endexample %} -Here is an example of using @var, a synonym of @member, to document a (virtual) variable 'foo'. +Here is an example of using `@var`, a synonym of `@member`, to document a (virtual) variable `foo`. {% example "Using @var to document a virtual member" %} diff --git a/content/en/tags-memberof.md b/content/en/tags-memberof.md index 3a884de2..0ba505bb 100644 --- a/content/en/tags-memberof.md +++ b/content/en/tags-memberof.md @@ -13,13 +13,13 @@ related: ## Overview -The @memberof tag identifies a member symbol that belongs to a parent symbol. +The `@memberof` tag identifies a member symbol that belongs to a parent symbol. -By default, the @memberof tag documents member symbols as static members. For inner and instance -members, you can use scoping punctuation after the namepath, or you can add the [@inner][inner-tag] -or [@instance][instance-tag] tag. +By default, the `@memberof` tag documents member symbols as static members. For inner and instance +members, you can use scoping punctuation after the namepath, or you can add the [`@inner`][inner-tag] +or [`@instance`][instance-tag] tag. -The "forced" @memberof tag, @memberof!, forces the object to be documented as belonging to a specific +The "forced" `@memberof` tag, `@memberof!`, forces the object to be documented as belonging to a specific parent even if it appears to have a different parent. [inner-tag]: tags-inner.html @@ -30,7 +30,7 @@ parent even if it appears to have a different parent. In the following example, the `hammer` function would normally be documented as a global function. That's because, in fact, it is a global function, but it is also a member of the `Tools` namespace, -and that's how you wish to document it. The solution is to add a @memberof tag: +and that's how you wish to document it. The solution is to add a `@memberof` tag: {% example "Using @memberof" %} @@ -46,8 +46,8 @@ Tools.hammer = hammer; ``` {% endexample %} -For instance members of a class, use the syntax "@memberof ClassName.prototype" or "@memberof -ClassName#". Alternatively, you can combine "@memberof ClassName" with the "@instance" tag. +For instance members of a class, use the syntax `@memberof ClassName.prototype` or +`@memberof ClassName#`. Alternatively, you can combine `@memberof ClassName` with the `@instance` tag. {% example "Using @memberof with a class prototype" %} @@ -85,13 +85,13 @@ create( ``` {% endexample %} -The following example uses the forced @memberof tag, "@memberof!", to document a property of an -object (Data#point) that is an instance member of a class (Data). +The following example uses the forced `@memberof` tag, `@memberof!`, to document a property of an +object (`Data#point`) that is an instance member of a class (`Data`). -When you use the @property tag to document a property, you cannot link to the property using its -longname. We can force the property to be linkable by using "@alias" and "@memberof!" to tell JSDoc -that Data#point.y should be documented as a member "point.y" of "Data#", rather than a member "y" of -"point" of "Data#". +When you use the `@property` tag to document a property, you cannot link to the property using its +longname. We can force the property to be linkable by using `@alias` and `@memberof!` to tell JSDoc +that `Data#point.y` should be documented as a member `point.y` of `Data#`, rather than a member `y` of +`point` of `Data#`. {% example "Using @memberof! for object properties" %} diff --git a/content/en/tags-mixes.md b/content/en/tags-mixes.md index a2023abc..d6f51f8c 100644 --- a/content/en/tags-mixes.md +++ b/content/en/tags-mixes.md @@ -14,15 +14,15 @@ related: ## Overview -The @mixes tag indicates that the current object mixes in all the members from `OtherObjectPath`, -which is a [@mixin][mixin-tag]. +The `@mixes` tag indicates that the current object mixes in all the members from `OtherObjectPath`, +which is a [`@mixin`][mixin-tag]. [mixin-tag]: tags-mixin.html ## Examples -To start, we document a mixin with the [@mixin][mixin-tag] tag: +To start, we document a mixin with the [`@mixin`][mixin-tag] tag: {% example "Example of a @mixin" %} @@ -55,9 +55,9 @@ var Eventful = { ``` {% endexample %} -Now we add a FormButton class and call a "mix" function that mixes all of the Eventful functions -into FormButton, so that FormButton can also fire events and have listeners. We use the @mixes tag -to indicate that FormButton mixes the Eventful functions. +Now we add a `FormButton` class and call a `mix` function that mixes all of the Eventful functions +into `FormButton`, so that `FormButton` can also fire events and have listeners. We use the `@mixes` tag +to indicate that `FormButton` mixes the `Eventful` functions. {% example "Using the @mixes tag" %} diff --git a/content/en/tags-mixin.md b/content/en/tags-mixin.md index 4ee53d16..3a0fda21 100644 --- a/content/en/tags-mixin.md +++ b/content/en/tags-mixin.md @@ -15,7 +15,7 @@ related: ## Overview A mixin provides functionality that is intended to be added to other objects. If desired, you can -use the @mixin tag to indicate that an object is a mixin. You can then add the @mixes tag to objects +use the `@mixin` tag to indicate that an object is a mixin. You can then add the `@mixes` tag to objects that use the mixin. diff --git a/content/en/tags-module.md b/content/en/tags-module.md index 8df9576c..e61278d8 100644 --- a/content/en/tags-module.md +++ b/content/en/tags-module.md @@ -19,16 +19,16 @@ Note: If you provide a type, you _must_ also provide a name. ## Overview -The @module tag marks the current file as being its own module. All symbols in the file are assumed +The `@module` tag marks the current file as being its own module. All symbols in the file are assumed to be members of the module unless documented otherwise. -Link to a module (e.g. within a [@link][link-tag] or [@see][see-tag] tag) using "module:moduleName". -For example, "@module foo/bar" can be linked to using "{@link module:foo/bar}". +Link to a module (e.g. within a [`@link`][link-tag] or [`@see`][see-tag] tag) using `module:moduleName`. +For example, `@module foo/bar` can be linked to using `{@link module:foo/bar}`. If the module name is not provided, it is derived from the module's path and filename. For example, suppose I have a file `test.js`, located in the `src` directory, that contains the block comment `/** @module */`. Here are some scenarios for running JSDoc and the resulting module names for -test.js: +`test.js`: {% example "Derived module names if none is provided." %} @@ -68,8 +68,8 @@ var bar = function() {}; When an exported symbol is defined as a member of `module.exports`, `exports`, or `this`, JSDoc infers that the symbol is a static member of the module. -In the following example, the Book class is documented as a static member, "module:bookshelf.Book", -with one instance member, "module:bookshelf.Book#title". +In the following example, the `Book` class is documented as a static member, `module:bookshelf.Book`, +with one instance member, `module:bookshelf.Book#title`. {% example "Defining exported symbols as a member of 'this'" %} @@ -83,8 +83,8 @@ this.Book = function (title) { ``` {% endexample %} -In the following example, the two functions have the namepaths "module:color/mixer.blend" and -"module:color/mixer.darken". +In the following example, the two functions have the namepaths `module:color/mixer.blend` and +`module:color/mixer.darken`. {% example "Defining exported symbols as a member of 'module.exports' or 'exports'" %} diff --git a/content/en/tags-name.md b/content/en/tags-name.md index f7aa1118..39c04821 100644 --- a/content/en/tags-name.md +++ b/content/en/tags-name.md @@ -12,17 +12,17 @@ related: ## Overview -The @name tag forces JSDoc to associate the remainder of the JSDoc comment with the given name, +The `@name` tag forces JSDoc to associate the remainder of the JSDoc comment with the given name, ignoring all surrounding code. This tag is best used in "virtual comments" for symbols that are not readily visible in the code, such as methods that are generated at runtime. -When you use the @name tag, you must provide additional tags that tell JSDoc what kind of symbol you +When you use the `@name` tag, you must provide additional tags that tell JSDoc what kind of symbol you are documenting; whether the symbol is a member of another symbol; and so on. If you do not provide this information, the symbol will not be documented correctly. -**Warning**: By using the @name tag, you are telling JSDoc to _ignore the surrounding code_ and +**Warning**: By using the `@name` tag, you are telling JSDoc to _ignore the surrounding code_ and treat your documentation comment in isolation. In many cases, it is best to use the -[@alias tag][alias-tag] instead, which changes a symbol's name in the documentation but preserves +[`@alias` tag][alias-tag] instead, which changes a symbol's name in the documentation but preserves other information about the symbol. [alias-tag]: tags-alias.html @@ -30,7 +30,7 @@ other information about the symbol. ## Examples -The following example shows how to use the @name tag to document a function that JSDoc would not +The following example shows how to use the `@name` tag to document a function that JSDoc would not normally recognize. {% example "Using the @name tag" %} diff --git a/content/en/tags-namespace.md b/content/en/tags-namespace.md index 2bacac44..a48bc553 100644 --- a/content/en/tags-namespace.md +++ b/content/en/tags-namespace.md @@ -12,14 +12,14 @@ related: ## Overview -The @namespace tag indicates that an object creates a namespace for its members. You can also write +The `@namespace` tag indicates that an object creates a namespace for its members. You can also write a virtual JSDoc comment that defines a namespace used by your code. If a namespace is defined by a symbol other than an object literal, you can include a type -expression along with the @namespace tag. If the @namespace tag includes a type, it must also +expression along with the `@namespace` tag. If the `@namespace` tag includes a type, it must also include a name. -You may need to document a namespace whose name includes unusual characters, such as "#" or "!". In +You may need to document a namespace whose name includes unusual characters, such as `#` or `!`. In these cases, when you document or link to the namespace, you must add quotation marks around the portion of the namespace that includes unusual characters. See the examples below for details. @@ -58,9 +58,9 @@ var MyNamespace = { ``` {% endexample %} -If a @namespace includes a symbol whose name has unusual characters, you must enclose the symbol's +If a `@namespace` includes a symbol whose name has unusual characters, you must enclose the symbol's name in double quotes. If the symbol's name already contains one or more double quotes, escape the -double quotes with a leading backslash (\\). +double quotes with a leading backslash (`\\`). {% example "Using the @namespace tag with unusual member names" %} diff --git a/content/en/tags-property.md b/content/en/tags-property.md index a14b9984..88b1c012 100644 --- a/content/en/tags-property.md +++ b/content/en/tags-property.md @@ -10,7 +10,7 @@ related: ## Overview -The @property tag is a way to easily document a list of static properties of a class, namespace or +The `@property` tag is a way to easily document a list of static properties of a class, namespace or other object. Normally JSDoc templates would create an entire new page to display information about each level of @@ -19,13 +19,13 @@ including nested properties, all together on the same page. Note that property tags must be used in doc comments for the thing that they are properties of, a namespace or a class for example. This tag is intended for simple collections of static properties, -it does not allow you to provide @examples or similar complex information for each property, just +it does not allow you to provide `@examples` or similar complex information for each property, just the type, name and description. ## Examples -In this example we have a namespace named "config." We want all the information about the defaults +In this example we have a namespace named `config`. We want all the information about the defaults property, including its nested values, to appear on the same page with the documentation for config. {% example "A namespace with defaults and nested default properties" %} diff --git a/content/en/tags-readonly.md b/content/en/tags-readonly.md index e9b1bd63..26c8a088 100644 --- a/content/en/tags-readonly.md +++ b/content/en/tags-readonly.md @@ -5,7 +5,7 @@ description: This symbol is meant to be read-only. ## Overview -The @readonly tag indicates that a symbol is intended to be read-only. Note this is for the purpose +The `@readonly` tag indicates that a symbol is intended to be read-only. Note this is for the purpose of documentation only - JSDoc won't check whether you've _actually_ treated the symbol as read-only in your code. diff --git a/content/en/tags-requires.md b/content/en/tags-requires.md index 11e27fcc..046f5728 100644 --- a/content/en/tags-requires.md +++ b/content/en/tags-requires.md @@ -9,9 +9,9 @@ description: This file requires a JavaScript module. ## Overview -The @requires tag allows you to document that a module is needed to use this code. A JSDoc comment -can have multiple @require tags. The module name can be specified as "moduleName" or -"module:moduleName"; both forms will be interpreted as modules. +The `@requires` tag allows you to document that a module is needed to use this code. A JSDoc comment +can have multiple `@require` tags. The module name can be specified as `moduleName` or +`module:moduleName`; both forms will be interpreted as modules. JSDoc does not attempt to process the module that is being included. If you want the module to be included in the documentation, you must include the module in the list of JavaScript files to diff --git a/content/en/tags-see.md b/content/en/tags-see.md index d8553eb0..c4ccfe2f 100644 --- a/content/en/tags-see.md +++ b/content/en/tags-see.md @@ -13,7 +13,7 @@ related: ## Overview -The @see tag allows you to refer to another symbol or resource that may be related to the one being +The `@see` tag allows you to refer to another symbol or resource that may be related to the one being documented. You can provide either a symbol's namepath or free-form text. If you provide a namepath, JSDoc's default template automatically converts the namepath to a link. diff --git a/content/en/tags-since.md b/content/en/tags-since.md index 5f9ce38c..56d805b0 100644 --- a/content/en/tags-since.md +++ b/content/en/tags-since.md @@ -12,7 +12,7 @@ related: ## Overview -The @since tag indicates that a class, method, or other symbol was added in a specific version. +The `@since` tag indicates that a class, method, or other symbol was added in a specific version. ## Examples diff --git a/content/en/tags-static.md b/content/en/tags-static.md index 087b0e52..9874f72a 100644 --- a/content/en/tags-static.md +++ b/content/en/tags-static.md @@ -9,17 +9,17 @@ related: ## Overview -The @static tag indicates that a symbol is contained within a parent and can be accessed without +The `@static` tag indicates that a symbol is contained within a parent and can be accessed without instantiating the parent. -Using the @static tag will override a symbol's default scope, with one exception: Symbols in global +Using the `@static` tag will override a symbol's default scope, with one exception: Symbols in global scope will remain global. ## Examples -The following example has the same effect as writing "@function MyNamespace.myFunction" and omitting -the @memberof and @static tags: +The following example has the same effect as writing `@function MyNamespace.myFunction` and omitting +the `@memberof` and `@static` tags: {% example "Using @static in a virtual comment" %} diff --git a/content/en/tags-summary.md b/content/en/tags-summary.md index eaa02c54..a5fa0bcb 100644 --- a/content/en/tags-summary.md +++ b/content/en/tags-summary.md @@ -13,7 +13,7 @@ related: ## Overview -The @summary tag is a shorter version of the full description. It can be added to any doclet. +The `@summary` tag is a shorter version of the full description. It can be added to any doclet. ## Examples diff --git a/content/en/tags-this.md b/content/en/tags-this.md index 87a65a57..6edc3297 100644 --- a/content/en/tags-this.md +++ b/content/en/tags-this.md @@ -12,13 +12,13 @@ related: ## Overview -The @this tag indicates what the `this` keyword refers to when used within another symbol. +The `@this` tag indicates what the `this` keyword refers to when used within another symbol. ## Examples -In the following example, the @this tag causes "this.name" to be documented as "Greeter#name" -rather than a global symbol called "name". +In the following example, the `@this` tag causes `this.name` to be documented as `Greeter#name` +rather than a global symbol called `name`. ```js /** @constructor */ diff --git a/content/en/tags-throws.md b/content/en/tags-throws.md index 2f6dd26e..04605092 100644 --- a/content/en/tags-throws.md +++ b/content/en/tags-throws.md @@ -14,8 +14,8 @@ synonyms: ## Overview -The @throws tag allows you to document an error that a function might throw. You can include the -@throws tag more than once in a single JSDoc comment. +The `@throws` tag allows you to document an error that a function might throw. You can include the +`@throws` tag more than once in a single JSDoc comment. ## Examples diff --git a/content/en/tags-todo.md b/content/en/tags-todo.md index 1a376398..79c51786 100644 --- a/content/en/tags-todo.md +++ b/content/en/tags-todo.md @@ -10,8 +10,8 @@ description: Document tasks to be completed. ## Overview -The @todo tag allows you to document tasks to be completed for some part of your code. You can use -the @todo tag more than once in a single JSDoc comment. +The `@todo` tag allows you to document tasks to be completed for some part of your code. You can use +the `@todo` tag more than once in a single JSDoc comment. ## Examples diff --git a/content/en/tags-type.md b/content/en/tags-type.md index 3c6cace4..667670a1 100644 --- a/content/en/tags-type.md +++ b/content/en/tags-type.md @@ -15,9 +15,9 @@ related: ## Overview -The @type tag allows you to provide a type expression identifying the type of value that a symbol +The `@type` tag allows you to provide a type expression identifying the type of value that a symbol may contain, or the type of value returned by a function. You can also include type expressions with -many other JSDoc tags, such as the [@param tag][param-tag]. +many other JSDoc tags, such as the [`@param` tag][param-tag]. A type expression can include the JSDoc namepath to a symbol (for example, `myNamespace.MyClass`); a built-in JavaScript type (for example, `string`); or a combination of these. You can use any @@ -280,7 +280,7 @@ var bar = 1; {% endexample %} In many cases, you can include a type expression as part of another tag, rather than including a -separate @type tag in your JSDoc comment. +separate `@type` tag in your JSDoc comment. {% example "Type expressions can accompany many tags." %} diff --git a/content/en/tags-typedef.md b/content/en/tags-typedef.md index 12dbebc4..39159014 100644 --- a/content/en/tags-typedef.md +++ b/content/en/tags-typedef.md @@ -14,11 +14,11 @@ related: ## Overview -The @typedef tag is useful for documenting custom types, particularly if you wish to refer to them +The `@typedef` tag is useful for documenting custom types, particularly if you wish to refer to them repeatedly. These types can then be used within other tags expecting a type, such as -[@type][type-tag] or [@param][param-tag]. +[`@type`][type-tag] or [`@param`][param-tag]. -Use the [@callback][callback-tag] tag to document the type of callback functions. +Use the [`@callback`][callback-tag] tag to document the type of callback functions. [callback-tag]: tags-callback.html [param-tag]: tags-param.html diff --git a/content/en/tags-variation.md b/content/en/tags-variation.md index abb3b8f2..8bce74ca 100644 --- a/content/en/tags-variation.md +++ b/content/en/tags-variation.md @@ -15,15 +15,15 @@ related: Sometimes your code may include multiple symbols with the same longname. For example, you might have both a global class and a top-level namespace called `Widget`. In cases such as these, what does -"{@link Widget}" or "@memberof Widget" mean? The global namespace, or the global class? +`{@link Widget}` or `@memberof Widget` mean? The global namespace, or the global class? Variations help JSDoc distinguish between different symbols with the same longname. For example, if -"@variation 2" is added to the JSDoc comment for the Widget class, "{@link Widget(2)}" will refer to -the class, and "{@link Widget}" will refer to the namespace. Alternatively, you can include the -variation when you specify the symbol's with tags such as [@alias][alias-tag] or [@name][name-tag] -(for example, "@alias Widget(2)"). +`@variation 2` is added to the JSDoc comment for the Widget class, `{@link Widget(2)}` will refer to +the class, and `{@link Widget}` will refer to the namespace. Alternatively, you can include the +variation when you specify the symbol's with tags such as [`@alias`][alias-tag] or [`@name`][name-tag] +(for example, `@alias Widget(2)`). -You can provide any value with the @variation tag, as long as the combination of the value and the +You can provide any value with the `@variation` tag, as long as the combination of the value and the longname results in a globally unique version of the longname. As a best practice, use a predictable pattern for choosing the values, which will make it easier for you to document your code. @@ -33,7 +33,7 @@ pattern for choosing the values, which will make it easier for you to document y ## Examples -The following example uses the @variation tag to distinguish between the Widget class and the Widget +The following example uses the `@variation` tag to distinguish between the Widget class and the Widget namespace. {% example "Using the @variation tag" %} diff --git a/content/en/tags-version.md b/content/en/tags-version.md index 6a6ddd56..97690848 100644 --- a/content/en/tags-version.md +++ b/content/en/tags-version.md @@ -7,7 +7,7 @@ related: ## Overview -Documents the version of an item. The text following the @version tag will be used to denote the +Documents the version of an item. The text following the `@version` tag will be used to denote the version of the item. diff --git a/howto-amd-modules.html b/howto-amd-modules.html index 9c136a8c..3299d277 100644 --- a/howto-amd-modules.html +++ b/howto-amd-modules.html @@ -98,8 +98,7 @@ <h2 id="function-that-returns-an-object-literal">Function that returns an object return shirt; }); -</code></pre> - </figure> +</code></pre></figure> <h2 id="function-that-returns-another-function">Function that returns another function</h2> <p>If you define your module as a function that exports another function, such as a constructor, you can use a standalone comment with a <a href="tags-module.html"><code>@module</code> tag</a> to document the module. You can then use an <a href="tags-alias.html"><code>@alias</code> tag</a> to tell JSDoc that the function uses the same longname as the module. @@ -126,8 +125,7 @@ <h2 id="function-that-returns-another-function">Function that returns another fu return Jacket; }); -</code></pre> - </figure> +</code></pre></figure> <h2 id="module-declared-in-a-return-statement">Module declared in a return statement</h2> <p>If you declare your module object in a function's <code>return</code> statement, you can use a standalone comment with a <a href="tags-module.html"><code>@module</code> tag</a> to document the module. You can then add an <a href="tags-alias.html"><code>@alias</code> tag</a> to tell JSDoc that the module object has the same longname as the module.</p> @@ -147,8 +145,7 @@ <h2 id="module-declared-in-a-return-statement">Module declared in a return state size: 'unisize' }; }); -</code></pre> - </figure> +</code></pre></figure> <h2 id="module-object-passed-to-a-function">Module object passed to a function</h2> <p>If the module object is passed into the function that defines your module, you can document the module by adding an <a href="tags-exports.html"><code>@exports</code> tag</a> to the function parameter. This pattern is supported in JSDoc 3.3.0 and later.</p> <figure> @@ -167,8 +164,7 @@ <h2 id="module-object-passed-to-a-function">Module object passed to a function</ // ... }; }); -</code></pre> - </figure> +</code></pre></figure> <h2 id="multiple-modules-defined-in-one-file">Multiple modules defined in one file</h2> <p>If you define more than one AMD module in a single JavaScript file, use the <a href="tags-exports.html"><code>@exports</code> tag</a> to document each module object.</p> @@ -217,8 +213,7 @@ <h2 id="multiple-modules-defined-in-one-file">Multiple modules defined in one fi return tag; }); -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -234,8 +229,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/howto-commonjs-modules.html b/howto-commonjs-modules.html index 3b67b6dd..158b3338 100644 --- a/howto-commonjs-modules.html +++ b/howto-commonjs-modules.html @@ -104,8 +104,7 @@ <h2 id="properties-of-the-exports-object">Properties of the 'exports' ob exports.unbutton = function() { // ... }; -</code></pre> - </figure> +</code></pre></figure> <p> <a name="local-vars"></a> </p> @@ -123,8 +122,7 @@ <h2 id="values-assigned-to-local-variables">Values assigned to local variables</ var wash = exports.wash = function() { // ... }; -</code></pre> - </figure> +</code></pre></figure> <p>In this case, JSDoc will <em>not</em> automatically document <code>wash</code> as an exported method, because the JSDoc comment appears immediately before the local variable <code>wash</code> rather than <code>exports.wash</code>. One solution is to add an <a href="tags-alias.html"><code>@alias</code> tag</a> that defines the correct longname for the method. In this case, the method is a static member of the module <code>my/shirt</code>, so the correct longname is @@ -142,8 +140,7 @@ <h2 id="values-assigned-to-local-variables">Values assigned to local variables</ var wash = exports.wash = function() { // ... }; -</code></pre> - </figure> +</code></pre></figure> <p>Another solution is to move the method's JSDoc comment so it comes immediately before <code>exports.wash</code>. This change allows JSDoc to detect that <code>wash</code> is exported by the module <code>my/shirt</code>:</p> <figure> @@ -157,8 +154,7 @@ <h2 id="values-assigned-to-local-variables">Values assigned to local variables</ exports.wash = function() { // ... }; -</code></pre> - </figure> +</code></pre></figure> <h2 id="values-assigned-to-module-exports-">Values assigned to 'module.exports'</h2> <p>In a Node.js module, you can assign a value directly to <code>module.exports</code>. This section explains how to document different types of values when they are assigned to <code>module.exports</code>.</p> @@ -193,8 +189,7 @@ <h3 id="object-literal-assigned-to-module-exports-">Object literal assigned to & // .. } }; -</code></pre> - </figure> +</code></pre></figure> <p>You can also use this pattern if you add properties to <code>module.exports</code> outside of the object literal: </p> <figure> @@ -224,8 +219,7 @@ <h3 id="object-literal-assigned-to-module-exports-">Object literal assigned to & module.exports.darken = function(color, percent) { // .. }; -</code></pre> - </figure> +</code></pre></figure> <h3 id="function-assigned-to-module-exports-">Function assigned to 'module.exports'</h3> <p>If you assign a function to <code>module.exports</code>, JSDoc will automatically set the correct longname for the function:</p> <figure> @@ -243,8 +237,7 @@ <h3 id="function-assigned-to-module-exports-">Function assigned to 'module.e module.exports = function(color1, color2) { // ... }; -</code></pre> - </figure> +</code></pre></figure> <p>The same pattern works for constructor functions:</p> <figure> <figcaption>Constructor assigned to 'module.exports'</figcaption><pre class="prettyprint lang-js"><code>/** @@ -256,8 +249,7 @@ <h3 id="function-assigned-to-module-exports-">Function assigned to 'module.e module.exports = function ColorMixer() { // ... }; -</code></pre> - </figure> +</code></pre></figure> <h3 id="string-number-or-boolean-assigned-to-module-exports-">String, number, or boolean assigned to 'module.exports'</h3> <p>For value types (strings, numbers, and booleans) assigned to <code>module.exports</code>, you must document the exported value's type by using the <a href="tags-type.html"><code>@type</code> tag</a> in the same JSDoc comment as the <code>@module</code> tag:</p> @@ -269,8 +261,7 @@ <h3 id="string-number-or-boolean-assigned-to-module-exports-">String, number, or */ module.exports = 'perniciousness'; -</code></pre> - </figure> +</code></pre></figure> <h2 id="values-assigned-to-module-exports-and-local-variables">Values assigned to 'module.exports' and local variables</h2> <p>If your module exports symbols that are not directly assigned to <code>module.exports</code>, you can use the <a href="tags-exports.html"><code>@exports</code> tag</a> in place of the <code>@module</code> tag. The <code>@exports</code> tag tells JSDoc that a symbol @@ -291,8 +282,8 @@ <h2 id="values-assigned-to-module-exports-and-local-variables">Values assigned t // ... } }; -</code></pre> - </figure> + +</code></pre></figure> <h2 id="properties-added-to-this-">Properties added to 'this'</h2> <p>When a module adds a property to its <code>this</code> object, JSDoc 3 automatically recognizes that the new property is exported by the module:</p> <figure> @@ -310,8 +301,7 @@ <h2 id="properties-added-to-this-">Properties added to 'this'</h2> /** The title of the book. */ this.title = title; } -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -327,8 +317,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/howto-es2015-classes.html b/howto-es2015-classes.html index 85b6f740..d6b62d2d 100644 --- a/howto-es2015-classes.html +++ b/howto-es2015-classes.html @@ -76,16 +76,14 @@ <h2 id="documenting-a-simple-class">Documenting a simple class</h2> // ... } } -</code></pre> - </figure> +</code></pre></figure> <p>You can also document classes that are defined in a class expression, which assigns the class to a variable or constant:</p> <figure> <figcaption>ES 2015 class expression</figcaption><pre class="prettyprint lang-js"><code>/** Class representing a point. */ const Point = class { // and so on } -</code></pre> - </figure> +</code></pre></figure> <h2 id="extending-classes">Extending classes</h2> <p>When you use the <code>extends</code> keyword to extend an existing class, you also need to tell JSDoc which class you're extending. You do this with the <a href="tags-augments.html"><code>@augments</code> (or <code>@extends</code>) tag</a>.</p> @@ -114,8 +112,7 @@ <h2 id="extending-classes">Extending classes</h2> // ... } } -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-augments.html">@augments</a> @@ -123,8 +120,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/howto-es2015-modules.html b/howto-es2015-modules.html index a2c4c9ff..35017945 100644 --- a/howto-es2015-modules.html +++ b/howto-es2015-modules.html @@ -85,8 +85,7 @@ <h2 id="exported-values">Exported values</h2> */ rgbify as toRgb } -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -99,8 +98,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/index.html b/index.html index 59360d93..650bb222 100644 --- a/index.html +++ b/index.html @@ -217,8 +217,7 @@ <h2>Contribute</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/plugins-markdown.html b/plugins-markdown.html index 0b1a0f10..78bf63cb 100644 --- a/plugins-markdown.html +++ b/plugins-markdown.html @@ -53,22 +53,15 @@ <h2 id="overview">Overview</h2> <a name="default-tags"></a> By default, JSDoc looks for Markdown-formatted text in the following JSDoc tags:</p> <ul> - <li><a href="tags-author.html"><code>@author</code></a> - </li> - <li><a href="tags-classdesc.html"><code>@classdesc</code></a> - </li> + <li><a href="tags-author.html"><code>@author</code></a></li> + <li><a href="tags-classdesc.html"><code>@classdesc</code></a></li> <li><a href="tags-description.html"><code>@description</code></a> (including untagged descriptions at the start of a JSDoc comment) </li> - <li><a href="tags-param.html"><code>@param</code></a> - </li> - <li><a href="tags-property.html"><code>@property</code></a> - </li> - <li><a href="tags-returns.html"><code>@returns</code></a> - </li> - <li><a href="tags-see.html"><code>@see</code></a> - </li> - <li><a href="tags-throws.html"><code>@throws</code></a> - </li> + <li><a href="tags-param.html"><code>@param</code></a></li> + <li><a href="tags-property.html"><code>@property</code></a></li> + <li><a href="tags-returns.html"><code>@returns</code></a></li> + <li><a href="tags-see.html"><code>@see</code></a></li> + <li><a href="tags-throws.html"><code>@throws</code></a></li> </ul> <h2 id="enabling-the-markdown-plugin">Enabling the Markdown plugin</h2> <p>To enable the Markdown plugin, add the string <code>plugins/markdown</code> to the <code>plugins</code> array in your @@ -77,8 +70,7 @@ <h2 id="enabling-the-markdown-plugin">Enabling the Markdown plugin</h2> <figcaption>JSON configuration file that enables the Markdown plugin</figcaption><pre class="prettyprint lang-json"><code>{ "plugins": ["plugins/markdown"] } -</code></pre> - </figure> +</code></pre></figure> <h2 id="converting-markdown-in-additional-jsdoc-tags">Converting Markdown in additional JSDoc tags</h2> <p>By default, the Markdown plugin only processes <a href="#default-tags">specific JSDoc tags</a> for Markdown text. You can handle Markdown text in other tags by adding a <code>markdown.tags</code> property to your JSDoc configuration file. The <code>markdown.tags</code> property contains an array of the additional @@ -94,8 +86,7 @@ <h2 id="converting-markdown-in-additional-jsdoc-tags">Converting Markdown in add "tags": ["foo", "bar"] } } -</code></pre> - </figure> +</code></pre></figure> <h2 id="excluding-the-default-tags-from-markdown-processing">Excluding the default tags from Markdown processing</h2> <p>To prevent the Markdown plugin from processing any of the <a href="#default-tags">default JSDoc tags</a>, add a <code>markdown.excludeTags</code> property to your JSDoc configuration file. The <code>markdown.excludeTags</code> property contains an array of the default @@ -108,8 +99,7 @@ <h2 id="excluding-the-default-tags-from-markdown-processing">Excluding the defau "excludeTags": ["author"] } } -</code></pre> - </figure> +</code></pre></figure> <h2 id="hard-wrapping-text-at-line-breaks">Hard-wrapping text at line breaks</h2> <p>By default, the Markdown plugin does not hard-wrap text at line breaks. This is because it's normal for a JSDoc comment to be wrapped across multiple lines. If you prefer to hard-wrap text at line breaks, set your JSDoc configuration file's <code>markdown.hardwrap</code> property to <code>true</code>. This @@ -121,8 +111,7 @@ <h2 id="adding-id-attributes-to-headings">Adding ID attributes to headings</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/styles/usejsdoc.css b/styles/usejsdoc.css index 6c285fa2..6de83bd6 100644 --- a/styles/usejsdoc.css +++ b/styles/usejsdoc.css @@ -24,13 +24,14 @@ header a, header a:visited { text-decoration: none; } -article { - margin: 18px; +article, footer { + margin: 18px auto; + max-width: 100ex; } footer { - margin: 16px; margin-top: 32px; + max-width: 120ex; font-style: italic; font-size: 0.8em; } @@ -107,7 +108,10 @@ ol, ul { code { font: 0.9em Consolas, "Lucida Console", Monaco, monospace; - background-color: #DEDEDE; + padding-left: 0.5ex; + padding-right: 0.5ex; + border-radius: 0.5ex; + background-color: #DFDFDF; } pre { @@ -116,7 +120,7 @@ pre { margin: 12px; padding: 8px; white-space: pre-wrap; - background-color: #DEDEDE; + background-color: #DFDFDF; } table { @@ -128,7 +132,7 @@ th, td { } th { - background-color: #DEDEDE; + background-color: #DFDFDF; color: #B93A38; } diff --git a/tags-abstract.html b/tags-abstract.html index d1781a41..e25e65bf 100644 --- a/tags-abstract.html +++ b/tags-abstract.html @@ -39,7 +39,7 @@ <h2 id="synonyms">Synonyms</h2> <code>@virtual</code> </p> <h2 id="overview">Overview</h2> - <p>The @abstract tag identifies members that must be implemented (or overridden) by objects that inherit the member.</p> + <p>The <code>@abstract</code> tag identifies members that must be implemented (or overridden) by objects that inherit the member.</p> <h2 id="example">Example</h2> <figure> <figcaption>Parent class with abstract method, and child class that implements the method</figcaption><pre class="prettyprint lang-js"><code>/** @@ -71,13 +71,11 @@ <h2 id="example">Example</h2> Milk.prototype.isSolid = function() { return false; }; -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-access.html b/tags-access.html index 8a466a8b..6bc11492 100644 --- a/tags-access.html +++ b/tags-access.html @@ -38,8 +38,7 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@access <package|private|protected|public></code> - </p> + <p><code>@access <package|private|protected|public></code></p> <h2 id="overview">Overview</h2> <p>The <code>@access</code> tag specifies the access level of a member. You can use the <code>@access</code> tag as a synonym for other tags:</p> <ul> @@ -91,8 +90,7 @@ <h2 id="examples">Examples</h2> this.pez = 3; } -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -120,8 +118,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-alias.html b/tags-alias.html index 810eee85..3e4657b3 100644 --- a/tags-alias.html +++ b/tags-alias.html @@ -38,13 +38,13 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@alias <aliasNamepath></code> - </p> + <p><code>@alias <aliasNamepath></code></p> <h2 id="overview">Overview</h2> - <p>The @alias tag causes JSDoc to treat all references to a member as if the member had a different name. This tag is especially useful if you define a class within - an inner function; in this case, you can use the @alias tag to tell JSDoc how the class is exposed in your app.</p> - <p>While the @alias tag may sound similar to the @name tag, these tags behave very differently. The @name tag tells JSDoc to ignore any code associated with the - comment. For example, when JSDoc processes the following code, it ignores the fact that the comment for <code>bar</code> is attached to a function: + <p>The <code>@alias</code> tag causes JSDoc to treat all references to a member as if the member had a different name. This tag is especially useful if you define + a class within an inner function; in this case, you can use the <code>@alias</code> tag to tell JSDoc how the class is exposed in your app.</p> + <p>While the <code>@alias</code> tag may sound similar to the <code>@name</code> tag, these tags behave very differently. The + <code>@name</code> tag tells JSDoc to ignore any code associated with the comment. For example, when JSDoc processes the following code, it ignores the fact + that the comment for <code>bar</code> is attached to a function: </p> <pre class="prettyprint lang-js"><code>/** * Bar function. @@ -52,22 +52,22 @@ <h2 id="overview">Overview</h2> */ function foo() {} </code></pre> - <p>The @alias tag tells JSDoc to pretend that Member A is actually named Member B. For example, when JSDoc processes the following code, it recognizes that <code>foo</code> is a function, then renames <code>foo</code> to + <p>The <code>@alias</code> tag tells JSDoc to pretend that <var>Member A</var> is actually named <var>Member B</var>. For example, when JSDoc processes the following + code, it recognizes that <code>foo</code> is a function, then renames <code>foo</code> to <code>bar</code> in the documentation:</p> <figure><pre class="prettyprint lang-js"><code>/** * Bar function. * @alias bar */ function foo() {} -</code></pre> - </figure> +</code></pre></figure> <h2 id="examples">Examples</h2> - <p>Suppose you are using a class framework that expects you to pass in a constructor function when you define a class. You can use the @alias tag to tell JSDoc - how the class will be exposed in your app.</p> - <p>In the following example, the @alias tag tells JSDoc to treat the anonymous function as if it were the constructor for the class "trackr.CookieManager". + <p>Suppose you are using a class framework that expects you to pass in a constructor function when you define a class. You can use the <code>@alias</code> tag to + tell JSDoc how the class will be exposed in your app.</p> + <p>In the following example, the <code>@alias</code> tag tells JSDoc to treat the anonymous function as if it were the constructor for the class <code>trackr.CookieManager</code>. Within the function, JSDoc interprets the - <code>this</code> keyword relative to trackr.CookieManager, so the "value" method has the namepath "trackr.CookieManager#value". - </p> + <code>this</code> keyword relative to <code>trackr.CookieManager</code>, so the <code>value</code> method has the namepath + <code>trackr.CookieManager#value</code>.</p> <figure> <figcaption>Using @alias with an anonymous constructor function</figcaption><pre class="prettyprint lang-js"><code>Klass('trackr.CookieManager', @@ -82,10 +82,8 @@ <h2 id="examples">Examples</h2> } ); -</code></pre> - </figure> - <p>You can also use the @alias tag with members that are created within an immediately invoked function expression (IIFE). The @alias tag tells JSDoc that these - members are exposed outside of the IIFE's scope. +</code></pre></figure> + <p>You can also use the <code>@alias</code> tag with members that are created within an immediately invoked function expression (IIFE). The <code>@alias</code> tag tells JSDoc that these members are exposed outside of the IIFE's scope. </p> <figure> <figcaption>Using @alias for static members of a namespace</figcaption><pre class="prettyprint lang-js"><code>/** @namespace */ @@ -103,9 +101,8 @@ <h2 id="examples">Examples</h2> ns.Core = core; })(Apple); -</code></pre> - </figure> - <p>For members that are defined within an object literal, you can use the @alias tag as an alternative to the <a href="tags-lends.html">@lends</a> tag.</p> +</code></pre></figure> + <p>For members that are defined within an object literal, you can use the <code>@alias</code> tag as an alternative to the <a href="tags-lends.html"><code>@lends</code></a> tag.</p> <figure> <figcaption>Using @alias for an object literal</figcaption><pre class="prettyprint lang-js"><code>// Documenting objectA with @alias @@ -146,8 +143,7 @@ <h2 id="examples">Examples</h2> return x; })(); -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -160,8 +156,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-async.html b/tags-async.html index 0842dcc6..42ff9da0 100644 --- a/tags-async.html +++ b/tags-async.html @@ -35,8 +35,7 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@async</code> - </p> + <p><code>@async</code></p> <h2 id="overview">Overview</h2> <p>The <code>@async</code> tag indicates that a function is <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/async_function">asynchronous</a>, meaning that it was declared using the syntax <code>async function foo() {}</code>. Do not use this tag for other types of asynchronous functions, such as @@ -55,13 +54,11 @@ <h2 id="example">Example</h2> * @param {string} url - The URL to download from. * @return {Promise<string>} The data from the URL. */ -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-augments.html b/tags-augments.html index 0ebb5296..f46094e7 100644 --- a/tags-augments.html +++ b/tags-augments.html @@ -45,8 +45,7 @@ <h2 id="synonyms">Synonyms</h2> <code>@extends</code> </p> <h2 id="syntax">Syntax</h2> - <p><code>@augments <namepath></code> - </p> + <p><code>@augments <namepath></code></p> <h2 id="overview">Overview</h2> <p>The <code>@augments</code> or<code>@extends</code> tag indicates that a symbol inherits from, and potentially adds to, a parent symbol. You can use this tag to document both class-based and prototype-based inheritance.</p> @@ -83,8 +82,7 @@ <h2 id="examples">Examples</h2> d.speak(); // Quack! d.alive = false; d.speak(); // (nothing) -</code></pre> - </figure> +</code></pre></figure> <p>In the following example, the <code>Duck</code> class inherits from both the <code>Flyable</code> and <code>Bird</code> classes, both of which define a <code>takeOff</code> method. Because the documentation for <code>Duck</code> lists <code>@augments Bird</code> last, JSDoc automatically documents <code>Duck#takeOff</code> using the comment from <code>Bird#takeOff</code>.</p> <figure> @@ -130,8 +128,7 @@ <h2 id="examples">Examples</h2> Duck.prototype.takeOff = function() { // ... }; -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -150,8 +147,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-author.html b/tags-author.html index b4ccfa2a..453c9589 100644 --- a/tags-author.html +++ b/tags-author.html @@ -38,19 +38,17 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@author <name> [<emailAddress>]</code> - </p> + <p><code>@author <name> [<emailAddress>]</code></p> <h2 id="overview">Overview</h2> - <p>The @author tag identifies the author of an item. In JSDoc 3.2 and later, if the author's name is followed by an email address enclosed in angle brackets, - the default template will convert the email address to a <code>mailto:</code> link.</p> + <p>The <code>@author</code> tag identifies the author of an item. In JSDoc 3.2 and later, if the author's name is followed by an email address enclosed in angle + brackets, the default template will convert the email address to a <code>mailto:</code> link.</p> <h2 id="examples">Examples</h2> <figure> <figcaption>Documenting the author of an item</figcaption><pre class="prettyprint lang-js"><code>/** * @author Jane Smith <jsmith@example.com> */ function MyClass() {} -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -63,8 +61,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-borrows.html b/tags-borrows.html index 4050591c..5bb750db 100644 --- a/tags-borrows.html +++ b/tags-borrows.html @@ -35,13 +35,12 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@borrows <that namepath> as <this namepath></code> - </p> + <p><code>@borrows <that namepath> as <this namepath></code></p> <h2 id="overview">Overview</h2> - <p>The @borrows tag allows you to add documentation for another symbol to your documentation.</p> + <p>The <code>@borrows</code> tag allows you to add documentation for another symbol to your documentation.</p> <p>This tag would be useful if you had more than one way to reference a function, but you didn't want to duplicate the same documentation in two places.</p> <h2 id="examples">Examples</h2> - <p>In this example there exists documentation for the "trstr" function, but "util.trim" is just a reference to that same function by a different + <p>In this example there exists documentation for the <code>trstr</code> function, but <code>util.trim</code> is just a reference to that same function by a different name.</p> <figure> <figcaption>Duplicate the documentation for trstr as util.trim</figcaption><pre class="prettyprint lang-js"><code>/** @@ -58,13 +57,11 @@ <h2 id="examples">Examples</h2> */ function trstr(str) { } -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-callback.html b/tags-callback.html index 0b4ef1d2..2dc327ec 100644 --- a/tags-callback.html +++ b/tags-callback.html @@ -38,13 +38,13 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@callback <namepath></code> - </p> + <p><code>@callback <namepath></code></p> <h2 id="overview">Overview</h2> - <p>The @callback tag provides information about a callback function that can be passed to other functions, including the callback's parameters and return value. - You can include any of the tags that you can provide for a @method.</p> - <p>Once you define a callback, you can use it in the same way as a custom type defined with the @typedef tag. In particular, you can use the callback's name - as a type name. This allows you to indicate that a function parameter should contain a certain type of callback.</p> + <p>The <code>@callback</code> tag provides information about a callback function that can be passed to other functions, including the callback's parameters + and return value. You can include any of the tags that you can provide for a <code>@method</code>.</p> + <p>Once you define a callback, you can use it in the same way as a custom type defined with the + <code>@typedef</code> tag. In particular, you can use the callback's name as a type name. This allows you to indicate that a function parameter should + contain a certain type of callback.</p> <p>If you want a callback to be displayed with the type definitions for a specific class, you can give the callback a namepath indicating that it is an inner function of that class. You can also define a global callback type that is referenced from multiple classes.</p> <h2 id="examples">Examples</h2> @@ -68,8 +68,7 @@ <h2 id="examples">Examples</h2> * @param {number} responseCode * @param {string} responseMessage */ -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Documenting a global callback</figcaption><pre class="prettyprint lang-js"><code>/** * @class @@ -90,8 +89,7 @@ <h2 id="examples">Examples</h2> * @param {number} responseCode * @param {string} responseMessage */ -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -104,8 +102,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-class.html b/tags-class.html index 51e2d5ab..57397b60 100644 --- a/tags-class.html +++ b/tags-class.html @@ -45,10 +45,9 @@ <h2 id="synonyms">Synonyms</h2> <code>@constructor</code> </p> <h2 id="syntax">Syntax</h2> - <p><code>@class [<type> <name>]</code> - </p> + <p><code>@class [<type> <name>]</code></p> <h2 id="overview">Overview</h2> - <p>The @class tag marks a function as being a constructor, meant to be called with the new keyword to return an instance.</p> + <p>The <code>@class</code> tag marks a function as being a constructor, meant to be called with the <code>new</code> keyword to return an instance.</p> <h2 id="examples">Examples</h2> <figure> <figcaption>A function that constructs Person instances.</figcaption><pre class="prettyprint lang-js"><code>/** @@ -59,8 +58,7 @@ <h2 id="examples">Examples</h2> } var p = new Person(); -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-constructs.html">@constructs</a> @@ -68,8 +66,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-classdesc.html b/tags-classdesc.html index 191a64f3..6a25e4b9 100644 --- a/tags-classdesc.html +++ b/tags-classdesc.html @@ -38,14 +38,13 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@classdesc <some description></code> - </p> + <p><code>@classdesc <some description></code></p> <h2 id="overview">Overview</h2> - <p>The @classdesc tag is used to provide a description for a class, separate from the constructor function's description. Use the @classdesc tag in combination - with the <a href="tags-class.html">@class (or @constructor) + <p>The <code>@classdesc</code> tag is used to provide a description for a class, separate from the constructor function's description. Use the <code>@classdesc</code> tag in combination with the <a href="tags-class.html"><code>@class</code> (or <code>@constructor</code>) tag</a>.</p> - <p>The functionality of the @classdesc tag in JSDoc 3 duplicates that of the @class in previous versions. As of version 3, the syntax and functionality of the @class - tag now exactly matches the @constructor tag, and the @classdesc tag more explicitly communicates its purpose: to document a class's description.</p> + <p>The functionality of the <code>@classdesc</code> tag in JSDoc 3 duplicates that of the <code>@class</code> in previous versions. As of version 3, the syntax + and functionality of the <code>@class</code> tag now exactly matches the + <code>@constructor</code> tag, and the <code>@classdesc</code> tag more explicitly communicates its purpose: to document a class's description.</p> <h2 id="examples">Examples</h2> <p>As shown below, a class has places for two descriptions, one applies to the function itself, while the other applies to the class in general.</p> <figure> @@ -56,8 +55,7 @@ <h2 id="examples">Examples</h2> */ function MyClass() { } -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -70,8 +68,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-constant.html b/tags-constant.html index d243ccf6..e18b2ff0 100644 --- a/tags-constant.html +++ b/tags-constant.html @@ -45,14 +45,12 @@ <h2 id="synonyms">Synonyms</h2> <code>@const</code> </p> <h2 id="syntax">Syntax</h2> - <p><code>@constant [<type> <name>]</code> - </p> + <p><code>@constant [<type> <name>]</code></p> <h2 id="overview">Overview</h2> - <p>The @constant tag is used to mark the documentation as belonging to a symbol that is a constant.</p> + <p>The <code>@constant</code> tag is used to mark the documentation as belonging to a symbol that is a constant.</p> <h2 id="examples">Examples</h2> <p>In this example we are documenting a string constant. Note that although the code is using the - <code>const</code> keyword, this is not required by JSDoc. If your JavaScript host environment doesn't yet support constant declarations, the @const documentation - can just as effectively be used on <code>var</code> declarations. + <code>const</code> keyword, this is not required by JSDoc. If your JavaScript host environment doesn't yet support constant declarations, the <code>@const</code> documentation can just as effectively be used on <code>var</code> declarations. </p> <figure> <figcaption>A string constant representing the color red</figcaption><pre class="prettyprint lang-js"><code>/** @constant @@ -63,10 +61,9 @@ <h2 id="examples">Examples</h2> /** @constant {number} */ var ONE = 1; -</code></pre> - </figure> - <p>Note that the example provides the type in a @type tag. This is optional. Also the optional @default tag is used here too, this will automatically add whatever - the assigned value is (for example 'FF0000') to the documentation.</p> +</code></pre></figure> + <p>Note that the example provides the type in a <code>@type</code> tag. This is optional. Also the optional + <code>@default</code> tag is used here too, this will automatically add whatever the assigned value is (for example <code>'FF0000'</code>) to the documentation.</p> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -79,8 +76,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-constructs.html b/tags-constructs.html index 276d4091..e51629af 100644 --- a/tags-constructs.html +++ b/tags-constructs.html @@ -42,8 +42,7 @@ <h2 id="overview">Overview</h2> particular function will be used to construct instances of that class. </p> <h2 id="syntax">Syntax</h2> - <p><code>@constructs [<name>]</code> - </p> + <p><code>@constructs [<name>]</code></p> <h2 id="examples">Examples</h2> <figure> <figcaption>Using the @constructs tag with @lends</figcaption><pre class="prettyprint lang-js"><code>var Person = makeClass( @@ -59,8 +58,7 @@ <h2 id="examples">Examples</h2> } } ); -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Without @lends you must provide the name of the class</figcaption><pre class="prettyprint lang-js"><code>makeClass('Menu', /** @@ -74,8 +72,7 @@ <h2 id="examples">Examples</h2> } } ); -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-lends.html">@lends</a> @@ -83,8 +80,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-copyright.html b/tags-copyright.html index 33d96069..e514af6f 100644 --- a/tags-copyright.html +++ b/tags-copyright.html @@ -38,10 +38,9 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@copyright <some copyright text></code> - </p> + <p><code>@copyright <some copyright text></code></p> <h2 id="overview">Overview</h2> - <p>The @copyright tag is used to document copyright information in a file overview comment. Use this tag in combination with the <a href="tags-file.html">@file tag</a>.</p> + <p>The <code>@copyright</code> tag is used to document copyright information in a file overview comment. Use this tag in combination with the <a href="tags-file.html"><code>@file</code> tag</a>.</p> <h2 id="examples">Examples</h2> <pre class="prettyprint lang-js"><code>/** * @file This is my cool script. @@ -55,8 +54,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-default.html b/tags-default.html index 19dbfcc9..70700417 100644 --- a/tags-default.html +++ b/tags-default.html @@ -42,28 +42,25 @@ <h2 id="synonyms">Synonyms</h2> <code>@defaultvalue</code> </p> <h2 id="syntax">Syntax</h2> - <p><code>@default [<some value>]</code> - </p> + <p><code>@default [<some value>]</code></p> <h2 id="overview">Overview</h2> - <p>The @default tag allows you to document the assigned value of a symbol. You can supply this tag with a value yourself or you can allow JSDoc to automatically - document the value from the source code -- only possible when the documented symbol is being assigned a single, simple value that is either: a string, a number, - a boolean or null.</p> + <p>The <code>@default</code> tag allows you to document the assigned value of a symbol. You can supply this tag with a value yourself or you can allow JSDoc to + automatically document the value from the source code -- only possible when the documented symbol is being assigned a single, simple value that is either: + a string, a number, a boolean or null.</p> <h2 id="examples">Examples</h2> - <p>In this example a constant is documented. The value of the constant is <code>0xff0000</code>. By adding the @default tag this value is automatically added to - the documentation.</p> + <p>In this example a constant is documented. The value of the constant is <code>0xff0000</code>. By adding the + <code>@default</code> tag this value is automatically added to the documentation.</p> <figure> <figcaption>Document the number value of a constant</figcaption><pre class="prettyprint lang-js"><code>/** * @constant * @default */ const RED = 0xff0000; -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-deprecated.html b/tags-deprecated.html index 5cdd1205..c0176dbd 100644 --- a/tags-deprecated.html +++ b/tags-deprecated.html @@ -35,12 +35,11 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@deprecated [<some text>]</code> - </p> + <p><code>@deprecated [<some text>]</code></p> <h2 id="overview">Overview</h2> - <p>The @deprecated tag marks a symbol in your code as being deprecated.</p> + <p>The <code>@deprecated</code> tag marks a symbol in your code as being deprecated.</p> <h2 id="examples">Examples</h2> - <p>You can use the @deprecated tag by itself, or include some text that describes more about the deprecation. + <p>You can use the <code>@deprecated</code> tag by itself, or include some text that describes more about the deprecation. </p> <figure> <figcaption>Document that the old function has been deprecated since version 2.0</figcaption><pre class="prettyprint lang-js"><code>/** @@ -48,13 +47,11 @@ <h2 id="examples">Examples</h2> */ function old() { } -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-description.html b/tags-description.html index 64970155..e652dc7d 100644 --- a/tags-description.html +++ b/tags-description.html @@ -45,14 +45,13 @@ <h2 id="synonyms">Synonyms</h2> <code>@desc</code> </p> <h2 id="syntax">Syntax</h2> - <p><code>@description <some description></code> - </p> + <p><code>@description <some description></code></p> <h2 id="overview">Overview</h2> - <p>The @description tag allows you to provide a general description of the symbol you are documenting. The description may include HTML markup. It may also include - Markdown formatting if the + <p>The <code>@description</code> tag allows you to provide a general description of the symbol you are documenting. The description may include HTML markup. It + may also include Markdown formatting if the <a href="plugins-markdown.html">Markdown plugin</a> is enabled.</p> <h2 id="examples">Examples</h2> - <p>If you describe a symbol at the very beginning of a JSDoc comment, before using any block tags, you may omit the @description tag.</p> + <p>If you describe a symbol at the very beginning of a JSDoc comment, before using any block tags, you may omit the <code>@description</code> tag.</p> <figure> <figcaption>Describing a symbol without the @description tag</figcaption><pre class="prettyprint lang-js"><code>/** * Add two numbers. @@ -63,9 +62,8 @@ <h2 id="examples">Examples</h2> function add(a, b) { return a + b; } -</code></pre> - </figure> - <p>By using the @description tag, you can place the description anywhere in the JSDoc comment.</p> +</code></pre></figure> + <p>By using the <code>@description</code> tag, you can place the description anywhere in the JSDoc comment.</p> <figure> <figcaption>Describing a symbol with the @description tag</figcaption><pre class="prettyprint lang-js"><code>/** * @param {number} a @@ -76,10 +74,9 @@ <h2 id="examples">Examples</h2> function add(a, b) { return a + b; } -</code></pre> - </figure> - <p>If there's both a description at the beginning of a JSDoc comment and a description provided with the @description tag, the description specified with the - @description will override the description at the beginning of the comment.</p> +</code></pre></figure> + <p>If there's both a description at the beginning of a JSDoc comment and a description provided with the <code>@description</code> tag, the description specified + with the <code>@description</code> will override the description at the beginning of the comment.</p> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -92,8 +89,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-enum.html b/tags-enum.html index c55e45df..2bda156d 100644 --- a/tags-enum.html +++ b/tags-enum.html @@ -38,15 +38,14 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@enum [<type>]</code> - </p> + <p><code>@enum [<type>]</code></p> <h2 id="overview">Overview</h2> - <p>The @enum tag documents a collection of static properties whose values are all of the same type.</p> + <p>The <code>@enum</code> tag documents a collection of static properties whose values are all of the same type.</p> <p>An enum is similar a collection of properties, except that an enum is documented in its own doc comment, whereas properties are documented within the doc comment - of their container. Often this tag is used with @readonly, as an enum typically represents a collection of constants.</p> + of their container. Often this tag is used with <code>@readonly</code>, as an enum typically represents a collection of constants.</p> <h2 id="examples">Examples</h2> <p>This shows how to document an object that represents a value with three possible states. Note that the enum members can have optional descriptions added if you - wish. Also you can override the type, as is shown with "MAYBE" -- by default enum members will be documented with the same type as the enum itself.</p> + wish. Also you can override the type, as is shown with <code>MAYBE</code> -- by default enum members will be documented with the same type as the enum itself.</p> <figure> <figcaption>A numeric enum, representing three states</figcaption><pre class="prettyprint lang-js"><code>/** * Enum for tri-state values. @@ -60,8 +59,7 @@ <h2 id="examples">Examples</h2> /** @type {boolean} */ MAYBE: true }; -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-property.html">@property</a> @@ -69,8 +67,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-event.html b/tags-event.html index fdbb0632..08a67149 100644 --- a/tags-event.html +++ b/tags-event.html @@ -38,16 +38,15 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@event <className>#[event:]<eventName></code> - </p> + <p><code>@event <className>#[event:]<eventName></code></p> <h2 id="overview">Overview</h2> - <p>The @event tag allows you to document an event that can be fired. A typical event is represented by an object with a defined set of properties.</p> - <p>Once you have used the @event tag to define a specific type of event, you can use the @fires tag to indicate that a method can fire that event. You can also - use the @listens tag to indicate that a symbol listens for the event.</p> + <p>The <code>@event</code> tag allows you to document an event that can be fired. A typical event is represented by an object with a defined set of properties.</p> + <p>Once you have used the <code>@event</code> tag to define a specific type of event, you can use the <code>@fires</code> tag to indicate that a method can fire + that event. You can also use the <code>@listens</code> tag to indicate that a symbol listens for the event.</p> <p>JSDoc automatically prepends the namespace <code>event:</code> to each event's name. In general, you must include this namespace when you link to the event - in another doclet. (The @fires tag is a notable exception; it allows you to omit the namespace.)</p> - <p><strong>Note</strong>: JSDoc 3 uses @event doclets to document the content of an event. In contrast, JSDoc Toolkit 2 used @event doclets to identify a function - that can be fired when an event of the same name occurs.</p> + in another doclet. (The <code>@fires</code> tag is a notable exception; it allows you to omit the namespace.)</p> + <p><strong>Note</strong>: JSDoc 3 uses <code>@event</code> doclets to document the content of an event. In contrast, JSDoc Toolkit 2 used <code>@event</code> doclets + to identify a function that can be fired when an event of the same name occurs.</p> <h2 id="examples">Examples</h2> <p>The following examples show how to document an event in the <code>Hurl</code> class called <code>snowball</code>. The event contains an object with a single property.</p> @@ -69,8 +68,7 @@ <h2 id="examples">Examples</h2> isPacked: this._snowball.isPacked }); }; -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Using a named doclet to document an event</figcaption><pre class="prettyprint lang-js"><code>/** * Throw a snowball. @@ -88,8 +86,7 @@ <h2 id="examples">Examples</h2> * @type {object} * @property {boolean} isPacked - Indicates whether the snowball is tightly packed. */ -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -102,8 +99,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-example.html b/tags-example.html index 376b8338..553f9af7 100644 --- a/tags-example.html +++ b/tags-example.html @@ -49,9 +49,8 @@ <h2 id="examples">Examples</h2> globalNS.method1 = function (a, b) { return b / a; }; -</code></pre> - </figure> - <p>Examples can also be captioned using <code><caption></caption></code> after the @example tag.</p> +</code></pre></figure> + <p>Examples can also be captioned using <code><caption></caption></code> after the <code>@example</code> tag.</p> <figure> <figcaption>Documenting examples with a caption</figcaption><pre class="prettyprint lang-js"><code>/** * Solves equations of the form a * x = b @@ -63,13 +62,11 @@ <h2 id="examples">Examples</h2> globalNS.method1 = function (a, b) { return b / a; }; -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-exports.html b/tags-exports.html index 436d0813..6baf47f2 100644 --- a/tags-exports.html +++ b/tags-exports.html @@ -38,14 +38,14 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@exports <moduleName></code> - </p> + <p><code>@exports <moduleName></code></p> <p>In JSDoc 3.3.0 and later, <code><moduleName></code> may include the <code>module:</code> prefix. In previous versions, you must omit this prefix.</p> <h2 id="overview">Overview</h2> - <p>Use the @exports tag when documenting JavaScript modules that export anything other than the "exports" object or the "module.exports" property.</p> + <p>Use the <code>@exports</code> tag when documenting JavaScript modules that export anything other than the + <code>exports</code> object or the <code>module.exports</code> property.</p> <h2 id="examples">Examples</h2> - <p>In modules where you are using the special "exports" object, the @exports tag is never needed. JSDoc automatically recognizes that this object's - members are being exported. Similarly, JSDoc automatically recognizes the special "module.exports" property in Node.js modules.</p> + <p>In modules where you are using the special <code>exports</code> object, the <code>@exports</code> tag is never needed. JSDoc automatically recognizes that this + object's members are being exported. Similarly, JSDoc automatically recognizes the special <code>module.exports</code> property in Node.js modules.</p> <figure> <figcaption>CommonJS module</figcaption><pre class="prettyprint lang-js"><code>/** * A module that says hello! @@ -56,8 +56,7 @@ <h2 id="examples">Examples</h2> exports.sayHello = function() { return 'Hello world'; }; -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Node.js module</figcaption><pre class="prettyprint lang-js"><code>/** * A module that shouts hello! @@ -68,8 +67,7 @@ <h2 id="examples">Examples</h2> module.exports = function() { return "HELLO WORLD"; }; -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>AMD module that exports an object literal</figcaption><pre class="prettyprint lang-js"><code>define(function() { @@ -86,8 +84,7 @@ <h2 id="examples">Examples</h2> return exports; }); -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>AMD module that exports a constructor</figcaption><pre class="prettyprint lang-js"><code>define(function() { /** @@ -110,10 +107,9 @@ <h2 id="examples">Examples</h2> return exports; }); -</code></pre> - </figure> - <p>If your module exports an object named anything other than "exports" or "module.exports", use the @exports tag to indicate what is being - exported.</p> +</code></pre></figure> + <p>If your module exports an object named anything other than <code>exports</code> or <code>module.exports</code>, use the + <code>@exports</code> tag to indicate what is being exported.</p> <figure> <figcaption>AMD module that exports an object</figcaption><pre class="prettyprint lang-js"><code>define(function () { @@ -130,8 +126,7 @@ <h2 id="examples">Examples</h2> return ns; }); -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -147,8 +142,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-external.html b/tags-external.html index 1367a87b..ed39ce18 100644 --- a/tags-external.html +++ b/tags-external.html @@ -42,8 +42,7 @@ <h2 id="synonyms">Synonyms</h2> <code>@host</code> </p> <h2 id="syntax">Syntax</h2> - <p><code>@external <NameOfExternal></code> - </p> + <p><code>@external <NameOfExternal></code></p> <h2 id="overview">Overview</h2> <p>The <code>@external</code> tag identifies a class, namespace, or module that is defined outside of the current package. By using this tag, you can document your package's extensions to the external symbol, or you can provide information about the external symbol to your package's users. You can also refer to @@ -70,8 +69,7 @@ <h2 id="examples">Examples</h2> * var greeting = new String('hello world'); * console.log( greeting.rot13() ); // uryyb jbeyq */ -</code></pre> - </figure> +</code></pre></figure> <p>The following example documents a new <code>starfairy</code> function added to the external namespace <code>"jQuery.fn"</code>:</p> <figure> @@ -85,8 +83,7 @@ <h2 id="examples">Examples</h2> * A jQuery plugin to make stars fly around your home page. * @function external:"jQuery.fn".starfairy */ -</code></pre> - </figure> +</code></pre></figure> <p>In the following example, the class <code>EncryptedRequest</code> is documented as a subclass of the built-in class <code>XMLHttpRequest</code>:</p> <figure> <figcaption>Extending an external.</figcaption><pre class="prettyprint lang-js"><code>/** @@ -100,8 +97,7 @@ <h2 id="examples">Examples</h2> * @class EncodedRequest * @extends external:XMLHttpRequest */ -</code></pre> - </figure> +</code></pre></figure> <p> <a name="nested-external-symbol"></a> You should only add the <code>@external</code> tag to the highest-level symbol that is defined outside of your project. In the following example, the documentation @@ -120,13 +116,11 @@ <h2 id="examples">Examples</h2> * @class TLS * @memberof external:security */ -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-file.html b/tags-file.html index 880101f1..0650a68c 100644 --- a/tags-file.html +++ b/tags-file.html @@ -47,15 +47,14 @@ <h2 id="synonyms">Synonyms</h2> </li> </ul> <h2 id="overview">Overview</h2> - <p>The @file tag provides a description for a file. Use the tag in a JSDoc comment at the beginning of the file.</p> + <p>The <code>@file</code> tag provides a description for a file. Use the tag in a JSDoc comment at the beginning of the file.</p> <h2 id="example">Example</h2> <figure> <figcaption>File description</figcaption><pre class="prettyprint lang-js"><code>/** * @file Manages the configuration settings for the widget. * @author Rowina Sanela <rsanela@example.com> */ -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -68,8 +67,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-fires.html b/tags-fires.html index aac67c9a..3a617186 100644 --- a/tags-fires.html +++ b/tags-fires.html @@ -45,11 +45,10 @@ <h2 id="synonyms">Synonyms</h2> <code>@emits</code> </p> <h2 id="syntax">Syntax</h2> - <p><code>@fires <className>#[event:]<eventName></code> - </p> + <p><code>@fires <className>#[event:]<eventName></code></p> <h2 id="overview">Overview</h2> - <p>The @fires tag indicates that a method can fire a specified type of event when it is called. Use the - <a href="tags-event.html">@event tag</a> to document the event's content.</p> + <p>The <code>@fires</code> tag indicates that a method can fire a specified type of event when it is called. Use the + <a href="tags-event.html"><code>@event</code> tag</a> to document the event's content.</p> <h2 id="examples">Examples</h2> <figure> <figcaption>Method that fires a 'drain' event</figcaption><pre class="prettyprint lang-js"><code>/** @@ -60,8 +59,7 @@ <h2 id="examples">Examples</h2> Milkshake.prototype.drink = function() { // ... }; -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -74,8 +72,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-function.html b/tags-function.html index 8d927acd..f7af5aa7 100644 --- a/tags-function.html +++ b/tags-function.html @@ -47,32 +47,27 @@ <h2 id="synonyms">Synonyms</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@function [<FunctionName>]</code> - </p> + <p><code>@function [<FunctionName>]</code></p> <h2 id="overview">Overview</h2> - <p>This marks an object as being a function, even though it may not appear to be one to the parser. It sets the doclet's <a href="tags-kind.html">@kind</a> to 'function'.</p> + <p>This marks an object as being a function, even though it may not appear to be one to the parser. It sets the doclet's <a href="tags-kind.html"><code>@kind</code></a> to <code>function</code>.</p> <h2 id="examples">Examples</h2> <figure> <figcaption>Using @function to mark a function.</figcaption><pre class="prettyprint lang-js"><code>/** @function */ var paginate = paginateFactory(pages); -</code></pre> - </figure> - <p>Without the @function tag, the <code>paginate</code> object would be documented as a generic object (a - <a href="tags-member.html">@member</a>), because it isn't possible to tell from examining the line of code what type of value <code>paginate</code> will - hold when it is run.</p> +</code></pre></figure> + <p>Without the <code>@function</code> tag, the <code>paginate</code> object would be documented as a generic object (a + <a href="tags-member.html"><code>@member</code></a>), because it isn't possible to tell from examining the line of code what type of value <code>paginate</code> will hold when it is run.</p> <figure> <figcaption>Using @function with a name.</figcaption><pre class="prettyprint lang-js"><code>/** @function myFunction */ // the above is the same as: /** @function * @name myFunction */ -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-generator.html b/tags-generator.html index e262b232..991ba919 100644 --- a/tags-generator.html +++ b/tags-generator.html @@ -35,8 +35,7 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@generator</code> - </p> + <p><code>@generator</code></p> <h2 id="overview">Overview</h2> <p>The <code>@generator</code> tag indicates that a function is a <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*">generator function</a>, meaning that it was declared using the syntax <code>function* foo() {}</code>. This tag is available in JSDoc 3.5.0 and later.</p> @@ -53,13 +52,11 @@ <h2 id="example">Example</h2> * @function fibonacci * @yields {number} The next number in the Fibonacci sequence. */ -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-global.html b/tags-global.html index af7690ca..a9d36173 100644 --- a/tags-global.html +++ b/tags-global.html @@ -35,10 +35,10 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="overview">Overview</h2> - <p>The @global tag specifies that a symbol should appear in the documentation as a <em>global</em> symbol. JSDoc ignores the symbol's actual scope within the - source file. This tag is especially useful for symbols that are defined locally, then assigned to a global symbol.</p> + <p>The <code>@global</code> tag specifies that a symbol should appear in the documentation as a <em>global</em> symbol. JSDoc ignores the symbol's actual scope + within the source file. This tag is especially useful for symbols that are defined locally, then assigned to a global symbol.</p> <h2 id="examples">Examples</h2> - <p>Use the @global tag to specify that a symbol should be documented as global.</p> + <p>Use the <code>@global</code> tag to specify that a symbol should be documented as global.</p> <figure> <figcaption>Document an inner variable as a global</figcaption><pre class="prettyprint lang-js"><code>(function() { /** @global */ @@ -46,8 +46,7 @@ <h2 id="examples">Examples</h2> this.foo = foo; }).apply(window); -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -66,8 +65,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-hideconstructor.html b/tags-hideconstructor.html index 0c46960e..4de199bb 100644 --- a/tags-hideconstructor.html +++ b/tags-hideconstructor.html @@ -38,8 +38,7 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@hideconstructor</code> - </p> + <p><code>@hideconstructor</code></p> <h2 id="overview">Overview</h2> <p>The <code>@hideconstructor</code> tag tells JSDoc that the generated documentation should not display the constructor for a class. This tag is available in JSDoc 3.5.0 and later.</p> @@ -87,8 +86,7 @@ <h2 id="examples">Examples</h2> } }; })(); -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>@hideconstructor tag with ES2015 class</figcaption><pre class="prettyprint lang-js"><code>/** * Waffle iron singleton. @@ -126,8 +124,7 @@ <h2 id="examples">Examples</h2> return new WaffleIron(); } } -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-class.html">@class</a> @@ -135,8 +132,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-ignore.html b/tags-ignore.html index 87ce9a4a..d8dc14a9 100644 --- a/tags-ignore.html +++ b/tags-ignore.html @@ -51,8 +51,7 @@ <h2 id="examples">Examples</h2> /** The jacket's color. */ this.color = null; } -</code></pre> - </figure> +</code></pre></figure> <p>In the following example, the <code>Clothes</code> namespace contains a <code>Jacket</code> class. The <code>@ignore</code> tag must be added to both <code>Clothes</code> and <code>Clothes.Jacket</code>. <code>Clothes</code>, <code>Clothes.Jacket</code>, and <code>Clothes.Jacket#color</code> will not appear in the documentation.</p> <figure> @@ -70,13 +69,11 @@ <h2 id="examples">Examples</h2> this.color = null; } }; -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-implements.html b/tags-implements.html index fbea54eb..fd26b903 100644 --- a/tags-implements.html +++ b/tags-implements.html @@ -38,8 +38,7 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@implements {typeExpression}</code> - </p> + <p><code>@implements {typeExpression}</code></p> <h2 id="overview">Overview</h2> <p>The <code>@implements</code> tag indicates that a symbol implements an interface.</p> <p>Add the <code>@implements</code> tag to the top-level symbol that implements the interface (for example, a constructor function). You do not need to add the @@ -89,8 +88,7 @@ <h2 id="examples">Examples</h2> TransparentColor.prototype.rgba = function() { // ... }; -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-interface.html">@interface</a> @@ -98,8 +96,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-inheritdoc.html b/tags-inheritdoc.html index 9ef1b716..5a285c46 100644 --- a/tags-inheritdoc.html +++ b/tags-inheritdoc.html @@ -68,8 +68,7 @@ <h2 id="examples">Examples</h2> Socket.prototype.open = function() { // ... }; -</code></pre> - </figure> +</code></pre></figure> <p>You can get the same result by omitting the JSDoc comment from <code>Socket#open</code>:</p> <figure> <figcaption>Inheriting documentation without the <code>@inheritdoc</code> tag</figcaption><pre class="prettyprint lang-js"><code>/** @@ -96,8 +95,7 @@ <h2 id="examples">Examples</h2> Socket.prototype.open = function() { // ... }; -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-override.html">@override</a> @@ -105,8 +103,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-inline-link.html b/tags-inline-link.html index fe7f4002..13433ed7 100644 --- a/tags-inline-link.html +++ b/tags-inline-link.html @@ -86,22 +86,19 @@ <h2 id="examples">Examples</h2> * {@link https://github.com GitHub}. */ function myFunction() {} -</code></pre> - </figure> +</code></pre></figure> <p>By default, the example above produces output similar to the following:</p> <figure> <figcaption>Output for {@link} tags</figcaption><pre class="prettyprint lang-html"><code>See <a href="MyClass.html">MyClass</a> and <a href="MyClass.html#foo">MyClass's foo property</a>. Also, check out <a href="http://www.google.com">Google</a> and <a href="https://github.com">GitHub</a>. -</code></pre> - </figure> +</code></pre></figure> <p>If the configuration property <code>templates.cleverLinks</code> were set to <code>true</code>, the example above would produce the following output:</p> <figure> <figcaption>Output with clever links enabled</figcaption><pre class="prettyprint lang-html"><code>See <a href="MyClass.html"><code>MyClass</code></a> and <a href="MyClass.html#foo"> <code>MyClass's foo property</code></a>. Also, check out <a href="http://www.google.com">Google</a> and <a href="https://github.com">GitHub</a>. -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -114,8 +111,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-inline-tutorial.html b/tags-inline-tutorial.html index 9627bf77..0afd90ce 100644 --- a/tags-inline-tutorial.html +++ b/tags-inline-tutorial.html @@ -56,8 +56,7 @@ <h2 id="examples">Examples</h2> * {@tutorial destroy Destroying a Widget}. */ function myFunction() {} -</code></pre> - </figure> +</code></pre></figure> <p>If all of these tutorials are defined, and the title of the <code>gettingstarted</code> tutorial is "Getting Started," the example above produces output similar to the following:</p> <figure> @@ -65,8 +64,7 @@ <h2 id="examples">Examples</h2> <a href="tutorial-dashboard.html">Configuring the Dashboard</a>. For more information, see <a href="tutorial-create.html">Creating a Widget</a> and <a href="tutorial-destroy.html">Destroying a Widget</a>. -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-tutorial.html">@tutorial</a> @@ -74,8 +72,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-inner.html b/tags-inner.html index 01a95d29..291e963d 100644 --- a/tags-inner.html +++ b/tags-inner.html @@ -35,8 +35,8 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="overview">Overview</h2> - <p>Using the @inner tag will mark a symbol as an inner member of its parent symbol. This means it can be referred to by "Parent~Child".</p> - <p>Using @inner will override a doclet's default scope (unless it is in the global scope, in which case it will remain global).</p> + <p>Using the <code>@inner</code> tag will mark a symbol as an inner member of its parent symbol. This means it can be referred to by <code>Parent~Child</code>.</p> + <p>Using <code>@inner</code> will override a doclet's default scope (unless it is in the global scope, in which case it will remain global).</p> <h2 id="examples">Examples</h2> <figure> <figcaption>Using @inner to make a virtual doclet an inner member</figcaption><pre class="prettyprint lang-js"><code>/** @namespace MyNamespace */ @@ -46,9 +46,9 @@ <h2 id="examples">Examples</h2> * @memberof MyNamespace * @inner */ -</code></pre> - </figure> - <p>Note that in the above we could have used "@function MyNamespace~myFunction" instead of the @memberof and @inner tags.</p> +</code></pre></figure> + <p>Note that in the above we could have used <code>@function MyNamespace~myFunction</code> instead of the + <code>@memberof</code> and <code>@inner</code> tags.</p> <figure> <figcaption>Using @inner</figcaption><pre class="prettyprint lang-js"><code>/** @namespace */ var MyNamespace = { @@ -58,8 +58,7 @@ <h2 id="examples">Examples</h2> */ foo: 1 }; -</code></pre> - </figure> +</code></pre></figure> <p>In the above example, we use @inner to force a member of a namespace to be documented as an inner member (by default, it would be a static member). This means that <code>foo</code> now has the longname <code>MyNamespace~foo</code> instead of <code>MyNamespace.foo</code>.</p> @@ -78,8 +77,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-instance.html b/tags-instance.html index 4ece08a4..21b191fb 100644 --- a/tags-instance.html +++ b/tags-instance.html @@ -35,10 +35,10 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="overview">Overview</h2> - <p>Using the @instance tag will mark a symbol as an instance member of its parent symbol. This means it can be referred to by "Parent#Child".</p> - <p>Using @instance will override a doclet's default scope (unless it is in the global scope, in which case it will remain global).</p> + <p>Using the <code>@instance</code> tag will mark a symbol as an instance member of its parent symbol. This means it can be referred to by <code>Parent#Child</code>.</p> + <p>Using <code>@instance</code> will override a doclet's default scope (unless it is in the global scope, in which case it will remain global).</p> <h2 id="examples">Examples</h2> - <p>The following example is a longhand way of writing "@function MyNamespace#myFunction":</p> + <p>The following example is a longhand way of writing <code>@function MyNamespace#myFunction</code>:</p> <figure> <figcaption>Using @instance to make a virtual doclet an instance member</figcaption><pre class="prettyprint lang-js"><code>/** @namespace MyNamespace */ /** @@ -47,10 +47,9 @@ <h2 id="examples">Examples</h2> * @memberof MyNamespace * @instance */ -</code></pre> - </figure> - <p>More usefully, you can use the @instance tag to override the scope that JSDoc infers. For example, you can indicate that a static member is used as an instance - member:</p> +</code></pre></figure> + <p>More usefully, you can use the <code>@instance</code> tag to override the scope that JSDoc infers. For example, you can indicate that a static member is used + as an instance member:</p> <figure> <figcaption>Using @instance to identify an instance member</figcaption><pre class="prettyprint lang-js"><code>/** @namespace */ var BaseObject = { @@ -66,8 +65,7 @@ <h2 id="examples">Examples</h2> var props = { foo: fooValue }; return Object.create(BaseObject, props); } -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -83,8 +81,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-interface.html b/tags-interface.html index deec24ca..e5aa2213 100644 --- a/tags-interface.html +++ b/tags-interface.html @@ -39,11 +39,9 @@ <h2>Table of Contents</h2> </ul> <h2 id="syntax">Syntax</h2> <p>With the JSDoc tag dictionary (enabled by default):</p> - <p><code>@interface [<name>]</code> - </p> + <p><code>@interface [<name>]</code></p> <p>With the <a href="https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#jsdoc-tags">Closure Compiler</a> tag dictionary:</p> - <p><code>@interface</code> - </p> + <p><code>@interface</code></p> <h2 id="overview">Overview</h2> <p>The <code>@interface</code> tag marks a symbol as an interface that other symbols can implement. For example, your code might define a parent class whose methods and properties are stubbed out. You can add the @@ -73,8 +71,7 @@ <h2 id="examples">Examples</h2> Color.prototype.rgb = function() { throw new Error('not implemented'); }; -</code></pre> - </figure> +</code></pre></figure> <p> <a name="virtual-comments"></a> The following example uses virtual comments, rather than code, to define the <code>Color</code> interface:</p> @@ -94,8 +91,7 @@ <h2 id="examples">Examples</h2> * @returns {Array<number>} An array containing the red, green, and blue values, * in that order. */ -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-implements.html">@implements</a> @@ -103,8 +99,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-kind.html b/tags-kind.html index 8090e0ef..79d49dda 100644 --- a/tags-kind.html +++ b/tags-kind.html @@ -38,27 +38,26 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@kind <kindName></code> - </p> + <p><code>@kind <kindName></code></p> <p>where <code><kindName></code> is one of:</p> <ul> - <li>class</li> - <li>constant</li> - <li>event</li> - <li>external</li> - <li>file</li> - <li>function</li> - <li>member</li> - <li>mixin</li> - <li>module</li> - <li>namespace</li> - <li>typedef</li> + <li><code>class</code></li> + <li><code>constant</code></li> + <li><code>event</code></li> + <li><code>external</code></li> + <li><code>file</code></li> + <li><code>function</code></li> + <li><code>member</code></li> + <li><code>mixin</code></li> + <li><code>module</code></li> + <li><code>namespace</code></li> + <li><code>typedef</code></li> </ul> <h2 id="overview">Overview</h2> - <p>The @kind tag is used to document what <em>kind</em> of symbol is being documented (for example, a class or a module). The <em>kind</em> of symbol differs from - a symbol's <em>type</em> (for example, string or boolean).</p> - <p>Usually you do not need the @kind tag, because the symbol's kind is determined by other tags in the doclet. For example, using the @class tag automatically - implies "@kind class", and using the @namespace tag implies "@kind namespace".</p> + <p>The <code>@kind</code> tag is used to document what <em>kind</em> of symbol is being documented (for example, a class or a module). The <em>kind</em> of symbol + differs from a symbol's <em>type</em> (for example, string or boolean).</p> + <p>Usually you do not need the <code>@kind</code> tag, because the symbol's kind is determined by other tags in the doclet. For example, using the <code>@class</code> tag automatically implies <code>@kind class</code>, and using the + <code>@namespace</code> tag implies <code>@kind namespace</code>.</p> <h2 id="examples">Examples</h2> <figure> <figcaption>Using @kind</figcaption><pre class="prettyprint lang-js"><code>// The following examples produce the same result: @@ -74,10 +73,9 @@ <h2 id="examples">Examples</h2> * @constant */ const asdf = 1; -</code></pre> - </figure> - <p>In the case of tags with conflicting kinds (for example, using both @module, which sets the kind to "module", and "@kind constant" which - sets the kind to "constant"), the last tag determines the kind.</p> +</code></pre></figure> + <p>In the case of tags with conflicting kinds (for example, using both <code>@module</code>, which sets the kind to + <code>module</code>, and <code>@kind constant</code> which sets the kind to <code>constant</code>), the last tag determines the kind.</p> <figure> <figcaption>Conflicting @kind statements</figcaption><pre class="prettyprint lang-js"><code>/** * This will show up as a constant @@ -90,8 +88,7 @@ <h2 id="examples">Examples</h2> * @kind constant * @module myModule */ -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-type.html">@type</a> @@ -99,8 +96,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-lends.html b/tags-lends.html index 0b580b31..bbc594c8 100644 --- a/tags-lends.html +++ b/tags-lends.html @@ -38,8 +38,7 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@lends <namepath></code> - </p> + <p><code>@lends <namepath></code></p> <h2 id="overview">Overview</h2> <p>The <code>@lends</code> tag allows you to document all the members of an object literal as if they were members of a symbol with the given name. You might want to do this if you are passing an object literal into a function that creates a named class from its members.</p> @@ -59,8 +58,7 @@ <h2 id="examples">Examples</h2> } } ); -</code></pre> - </figure> +</code></pre></figure> <p>Without any comments, JSDoc won't recognize that this code creates a <code>Person</code> class with two methods. To document the methods, we must use a <code>@lends</code> tag in a doc comment immediately before the object literal. The <code>@lends</code> tag tells JSDoc that all the member names of that object literal are being "loaned" to a variable named <code>Person</code>. We must also add comments to each of the methods.</p> <p>The following example gets us closer to what we want:</p> @@ -86,8 +84,7 @@ <h2 id="examples">Examples</h2> } } ); -</code></pre> - </figure> +</code></pre></figure> <p>Now the functions named <code>initialize</code> and <code>say</code> will be documented, but they appear as static methods of the <code>Person</code> class. That is possibly what you meant, but in this case we want <code>initialize</code> and <code>say</code> to belong to the instances of the <code>Person</code> class. So we change things slightly by lending the methods to the class's prototype:</p> @@ -113,8 +110,7 @@ <h2 id="examples">Examples</h2> } } ); -</code></pre> - </figure> +</code></pre></figure> <p>One final step: Our class framework uses the loaned <code>initialize</code> function to construct <code>Person</code> instances, but a <code>Person</code> instance does not have its own <code>initialize</code> method. The solution is to add the <code>@constructs</code> tag to the loaned function. Remember to remove the <code>@class</code> tag as well, or else two classes will be documented.</p> @@ -140,8 +136,7 @@ <h2 id="examples">Examples</h2> } } ); -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -154,8 +149,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-license.html b/tags-license.html index acae2903..5a90d575 100644 --- a/tags-license.html +++ b/tags-license.html @@ -35,8 +35,7 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@license <identifier></code> - </p> + <p><code>@license <identifier></code></p> <h2 id="overview">Overview</h2> <p>The <code>@license</code> tag identifies the software license that applies to any portion of your code.</p> <p>You can use any text to identify the license you are using. If your code uses a standard open-source license, consider using the appropriate identifier from @@ -51,8 +50,7 @@ <h2 id="examples">Examples</h2> * @module foo/util * @license Apache-2.0 */ -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>A standalone JSDoc comment with the complete MIT license</figcaption><pre class="prettyprint lang-js"><code>/** * @license @@ -76,13 +74,11 @@ <h2 id="examples">Examples</h2> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-listens.html b/tags-listens.html index 684d37f0..60ade41b 100644 --- a/tags-listens.html +++ b/tags-listens.html @@ -38,8 +38,7 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@listens <eventName></code> - </p> + <p><code>@listens <eventName></code></p> <h2 id="overview">Overview</h2> <p>The <code>@listens</code> tag indicates that a symbol listens for the specified event. Use the <a href="tags-event.html"><code>@event tag</code></a> to document the event's content.</p> @@ -95,8 +94,7 @@ <h2 id="example">Example</h2> return exports; }); -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -109,8 +107,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-member.html b/tags-member.html index 3178439f..fef51446 100644 --- a/tags-member.html +++ b/tags-member.html @@ -42,11 +42,10 @@ <h2 id="synonyms">Synonyms</h2> <code>@var</code> </p> <h2 id="syntax">Syntax</h2> - <p><code>@member [<type>] [<name>]</code> - </p> + <p><code>@member [<type>] [<name>]</code></p> <h2 id="overview">Overview</h2> - <p>The @member tag identifies any member that does not have a more specialized kind, such as "class", "function", or "constant". A - member can optionally have a type as well as a name.</p> + <p>The <code>@member</code> tag identifies any member that does not have a more specialized kind, such as <code>class</code>, + <code>function</code>, or <code>constant</code>. A member can optionally have a type as well as a name.</p> <h2 id="examples">Examples</h2> <figure> <figcaption>Using @member with Data#point</figcaption><pre class="prettyprint lang-js"><code>/** @class */ @@ -54,16 +53,14 @@ <h2 id="examples">Examples</h2> /** @member {Object} */ this.point = {}; } -</code></pre> - </figure> - <p>Here is an example of using @var, a synonym of @member, to document a (virtual) variable 'foo'.</p> +</code></pre></figure> + <p>Here is an example of using <code>@var</code>, a synonym of <code>@member</code>, to document a (virtual) variable <code>foo</code>.</p> <figure> <figcaption>Using @var to document a virtual member</figcaption><pre class="prettyprint lang-js"><code>/** * A variable in the global namespace called 'foo'. * @var {number} foo */ -</code></pre> - </figure> +</code></pre></figure> <p>The above example is equivalent to the following:</p> <pre class="prettyprint lang-js"><code>/** * A variable in the global namespace called 'foo'. @@ -74,8 +71,7 @@ <h2 id="examples">Examples</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-memberof.html b/tags-memberof.html index 55b77494..20dc138a 100644 --- a/tags-memberof.html +++ b/tags-memberof.html @@ -39,20 +39,18 @@ <h2>Table of Contents</h2> </ul> <h2 id="syntax">Syntax</h2> <ul> - <li><code>@memberof <parentNamepath></code> - </li> - <li><code>@memberof! <parentNamepath></code> - </li> + <li><code>@memberof <parentNamepath></code></li> + <li><code>@memberof! <parentNamepath></code></li> </ul> <h2 id="overview">Overview</h2> - <p>The @memberof tag identifies a member symbol that belongs to a parent symbol.</p> - <p>By default, the @memberof tag documents member symbols as static members. For inner and instance members, you can use scoping punctuation after the namepath, - or you can add the <a href="tags-inner.html">@inner</a> or <a href="tags-instance.html">@instance</a> tag.</p> - <p>The "forced" @memberof tag, @memberof!, forces the object to be documented as belonging to a specific parent even if it appears to have a different - parent.</p> + <p>The <code>@memberof</code> tag identifies a member symbol that belongs to a parent symbol.</p> + <p>By default, the <code>@memberof</code> tag documents member symbols as static members. For inner and instance members, you can use scoping punctuation after + the namepath, or you can add the <a href="tags-inner.html"><code>@inner</code></a> or <a href="tags-instance.html"><code>@instance</code></a> tag.</p> + <p>The "forced" <code>@memberof</code> tag, <code>@memberof!</code>, forces the object to be documented as belonging to a specific parent even if it appears + to have a different parent.</p> <h2 id="examples">Examples</h2> <p>In the following example, the <code>hammer</code> function would normally be documented as a global function. That's because, in fact, it is a global function, - but it is also a member of the <code>Tools</code> namespace, and that's how you wish to document it. The solution is to add a @memberof tag:</p> + but it is also a member of the <code>Tools</code> namespace, and that's how you wish to document it. The solution is to add a <code>@memberof</code> tag:</p> <figure> <figcaption>Using @memberof</figcaption><pre class="prettyprint lang-js"><code>/** @namespace */ var Tools = {}; @@ -62,10 +60,9 @@ <h2 id="examples">Examples</h2> }; Tools.hammer = hammer; -</code></pre> - </figure> - <p>For instance members of a class, use the syntax "@memberof ClassName.prototype" or "@memberof ClassName#". Alternatively, you can combine - "@memberof ClassName" with the "@instance" tag.</p> +</code></pre></figure> + <p>For instance members of a class, use the syntax <code>@memberof ClassName.prototype</code> or + <code>@memberof ClassName#</code>. Alternatively, you can combine <code>@memberof ClassName</code> with the <code>@instance</code> tag.</p> <figure> <figcaption>Using @memberof with a class prototype</figcaption><pre class="prettyprint lang-js"><code>/** @class Observable */ create( @@ -97,13 +94,12 @@ <h2 id="examples">Examples</h2> end: function() {} } ); -</code></pre> - </figure> - <p>The following example uses the forced @memberof tag, "@memberof!", to document a property of an object (Data#point) that is an instance member of a - class (Data).</p> - <p>When you use the @property tag to document a property, you cannot link to the property using its longname. We can force the property to be linkable by using - "@alias" and "@memberof!" to tell JSDoc that Data#point.y should be documented as a member "point.y" of "Data#", rather - than a member "y" of "point" of "Data#".</p> +</code></pre></figure> + <p>The following example uses the forced <code>@memberof</code> tag, <code>@memberof!</code>, to document a property of an object (<code>Data#point</code>) that + is an instance member of a class (<code>Data</code>).</p> + <p>When you use the <code>@property</code> tag to document a property, you cannot link to the property using its longname. We can force the property to be linkable + by using <code>@alias</code> and <code>@memberof!</code> to tell JSDoc that <code>Data#point.y</code> should be documented as a member <code>point.y</code> of <code>Data#</code>, rather than a member <code>y</code> of + <code>point</code> of <code>Data#</code>.</p> <figure> <figcaption>Using @memberof! for object properties</figcaption><pre class="prettyprint lang-js"><code>/** @class */ function Data() { @@ -124,8 +120,7 @@ <h2 id="examples">Examples</h2> y: 1 }; } -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-name.html">@name</a> @@ -133,8 +128,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-mixes.html b/tags-mixes.html index cbf42b5a..94d9f991 100644 --- a/tags-mixes.html +++ b/tags-mixes.html @@ -38,12 +38,11 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@mixes <OtherObjectPath></code> - </p> + <p><code>@mixes <OtherObjectPath></code></p> <h2 id="overview">Overview</h2> - <p>The @mixes tag indicates that the current object mixes in all the members from <code>OtherObjectPath</code>, which is a <a href="tags-mixin.html">@mixin</a>.</p> + <p>The <code>@mixes</code> tag indicates that the current object mixes in all the members from <code>OtherObjectPath</code>, which is a <a href="tags-mixin.html"><code>@mixin</code></a>.</p> <h2 id="examples">Examples</h2> - <p>To start, we document a mixin with the <a href="tags-mixin.html">@mixin</a> tag:</p> + <p>To start, we document a mixin with the <a href="tags-mixin.html"><code>@mixin</code></a> tag:</p> <figure> <figcaption>Example of a @mixin</figcaption><pre class="prettyprint lang-js"><code>/** * This provides methods used for event handling. It's not meant to @@ -70,10 +69,9 @@ <h2 id="examples">Examples</h2> // code... } }; -</code></pre> - </figure> - <p>Now we add a FormButton class and call a "mix" function that mixes all of the Eventful functions into FormButton, so that FormButton can also fire - events and have listeners. We use the @mixes tag to indicate that FormButton mixes the Eventful functions.</p> +</code></pre></figure> + <p>Now we add a <code>FormButton</code> class and call a <code>mix</code> function that mixes all of the Eventful functions into <code>FormButton</code>, so that + <code>FormButton</code> can also fire events and have listeners. We use the <code>@mixes</code> tag to indicate that <code>FormButton</code> mixes the <code>Eventful</code> functions.</p> <figure> <figcaption>Using the @mixes tag</figcaption><pre class="prettyprint lang-js"><code>/** * @constructor FormButton @@ -86,8 +84,7 @@ <h2 id="examples">Examples</h2> this.fire('press', {}); } mix(Eventful).into(FormButton.prototype); -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -103,8 +100,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-mixin.html b/tags-mixin.html index e0a05ce6..60044bc0 100644 --- a/tags-mixin.html +++ b/tags-mixin.html @@ -38,11 +38,10 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@mixin [<MixinName>]</code> - </p> + <p><code>@mixin [<MixinName>]</code></p> <h2 id="overview">Overview</h2> - <p>A mixin provides functionality that is intended to be added to other objects. If desired, you can use the @mixin tag to indicate that an object is a mixin. You - can then add the @mixes tag to objects that use the mixin.</p> + <p>A mixin provides functionality that is intended to be added to other objects. If desired, you can use the <code>@mixin</code> tag to indicate that an object + is a mixin. You can then add the <code>@mixes</code> tag to objects that use the mixin.</p> <h2 id="examples">Examples</h2> <figure> <figcaption>Using @mixin</figcaption><pre class="prettyprint lang-js"><code>/** @@ -70,8 +69,7 @@ <h2 id="examples">Examples</h2> // code... } }; -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -87,8 +85,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-module.html b/tags-module.html index 5afead6f..2ed2c604 100644 --- a/tags-module.html +++ b/tags-module.html @@ -38,18 +38,18 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@module [[{<type>}] <moduleName>]</code> - </p> + <p><code>@module [[{<type>}] <moduleName>]</code></p> <p>In JSDoc 3.3.0 and later, <code><moduleName></code> may include the <code>module:</code> prefix. In previous versions, you must omit this prefix.</p> <p>Note: If you provide a type, you <em>must</em> also provide a name.</p> <h2 id="overview">Overview</h2> - <p>The @module tag marks the current file as being its own module. All symbols in the file are assumed to be members of the module unless documented otherwise.</p> - <p>Link to a module (e.g. within a <a href="tags-inline-link.html">@link</a> or <a href="tags-see.html">@see</a> tag) using "module:moduleName". For example, - "@module foo/bar" can be linked to using "{@link module:foo/bar}".</p> + <p>The <code>@module</code> tag marks the current file as being its own module. All symbols in the file are assumed to be members of the module unless documented + otherwise.</p> + <p>Link to a module (e.g. within a <a href="tags-inline-link.html"><code>@link</code></a> or <a href="tags-see.html"><code>@see</code></a> tag) using <code>module:moduleName</code>. + For example, <code>@module foo/bar</code> can be linked to using <code>{@link module:foo/bar}</code>.</p> <p>If the module name is not provided, it is derived from the module's path and filename. For example, suppose I have a file <code>test.js</code>, located in the <code>src</code> directory, that contains the block comment - <code>/** @module */</code>. Here are some scenarios for running JSDoc and the resulting module names for test.js: - </p> + <code>/** @module */</code>. Here are some scenarios for running JSDoc and the resulting module names for + <code>test.js</code>:</p> <figure> <figcaption>Derived module names if none is provided.</figcaption><pre class="prettyprint"><code># from src/ jsdoc ./test.js # module name 'test' @@ -57,8 +57,7 @@ <h2 id="overview">Overview</h2> # from src's parent directory: jsdoc src/test.js # module name 'src/test' jsdoc -r src/ # module name 'test' -</code></pre> - </figure> +</code></pre></figure> <h2 id="examples">Examples</h2> <p>The following example shows the namepaths that are used for symbols in a module. The first symbol is a module-private, or "inner," variable--it can be only accessed within the module. The second symbol is a static function that is exported by the module.</p> @@ -70,11 +69,10 @@ <h2 id="examples">Examples</h2> /** will be module:myModule.bar */ var bar = function() {}; -</code></pre> - </figure> +</code></pre></figure> <p>When an exported symbol is defined as a member of <code>module.exports</code>, <code>exports</code>, or <code>this</code>, JSDoc infers that the symbol is a static member of the module.</p> - <p>In the following example, the Book class is documented as a static member, "module:bookshelf.Book", with one instance member, "module:bookshelf.Book#title".</p> + <p>In the following example, the <code>Book</code> class is documented as a static member, <code>module:bookshelf.Book</code>, with one instance member, <code>module:bookshelf.Book#title</code>.</p> <figure> <figcaption>Defining exported symbols as a member of 'this'</figcaption><pre class="prettyprint lang-js"><code>/** @module bookshelf */ /** @class */ @@ -82,10 +80,9 @@ <h2 id="examples">Examples</h2> /** The title. */ this.title = title; }; -</code></pre> - </figure> - <p>In the following example, the two functions have the namepaths "module:color/mixer.blend" and "module:color/mixer.darken". - </p> +</code></pre></figure> + <p>In the following example, the two functions have the namepaths <code>module:color/mixer.blend</code> and + <code>module:color/mixer.darken</code>.</p> <figure> <figcaption>Defining exported symbols as a member of 'module.exports' or 'exports'</figcaption><pre class="prettyprint lang-js"><code>/** @module color/mixer */ module.exports = { @@ -94,8 +91,7 @@ <h2 id="examples">Examples</h2> }; /** Darkens a color. */ exports.darken = function (color, shade) {}; -</code></pre> - </figure> +</code></pre></figure> <p>See <a href="howto-commonjs-modules.html">Documenting JavaScript Modules</a> for further examples.</p> <h2 id="related-links">Related Links</h2> <ul> @@ -112,8 +108,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-name.html b/tags-name.html index 868827b4..3980dfdb 100644 --- a/tags-name.html +++ b/tags-name.html @@ -38,18 +38,18 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@name <namePath></code> - </p> + <p><code>@name <namePath></code></p> <h2 id="overview">Overview</h2> - <p>The @name tag forces JSDoc to associate the remainder of the JSDoc comment with the given name, ignoring all surrounding code. This tag is best used in "virtual - comments" for symbols that are not readily visible in the code, such as methods that are generated at runtime.</p> - <p>When you use the @name tag, you must provide additional tags that tell JSDoc what kind of symbol you are documenting; whether the symbol is a member of another - symbol; and so on. If you do not provide this information, the symbol will not be documented correctly.</p> - <p><strong>Warning</strong>: By using the @name tag, you are telling JSDoc to <em>ignore the surrounding code</em> and treat your documentation comment in isolation. - In many cases, it is best to use the - <a href="tags-alias.html">@alias tag</a> instead, which changes a symbol's name in the documentation but preserves other information about the symbol.</p> + <p>The <code>@name</code> tag forces JSDoc to associate the remainder of the JSDoc comment with the given name, ignoring all surrounding code. This tag is best + used in "virtual comments" for symbols that are not readily visible in the code, such as methods that are generated at runtime.</p> + <p>When you use the <code>@name</code> tag, you must provide additional tags that tell JSDoc what kind of symbol you are documenting; whether the symbol is a member + of another symbol; and so on. If you do not provide this information, the symbol will not be documented correctly.</p> + <p><strong>Warning</strong>: By using the <code>@name</code> tag, you are telling JSDoc to <em>ignore the surrounding code</em> and treat your documentation comment + in isolation. In many cases, it is best to use the + <a href="tags-alias.html"><code>@alias</code> tag</a> instead, which changes a symbol's name in the documentation but preserves other information about + the symbol.</p> <h2 id="examples">Examples</h2> - <p>The following example shows how to use the @name tag to document a function that JSDoc would not normally recognize.</p> + <p>The following example shows how to use the <code>@name</code> tag to document a function that JSDoc would not normally recognize.</p> <figure> <figcaption>Using the @name tag</figcaption><pre class="prettyprint lang-js"><code>/** * @name highlightSearchTerm @@ -58,8 +58,7 @@ <h2 id="examples">Examples</h2> * @param {string} term - The search term to highlight. */ eval("window.highlightSearchTerm = function(term) {};") -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -72,8 +71,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-namespace.html b/tags-namespace.html index 8689cb62..6841d38a 100644 --- a/tags-namespace.html +++ b/tags-namespace.html @@ -38,14 +38,12 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@namespace [[{<type>}] <SomeName>]</code> - </p> + <p><code>@namespace [[{<type>}] <SomeName>]</code></p> <h2 id="overview">Overview</h2> - <p>The @namespace tag indicates that an object creates a namespace for its members. You can also write a virtual JSDoc comment that defines a namespace used by - your code.</p> - <p>If a namespace is defined by a symbol other than an object literal, you can include a type expression along with the @namespace tag. If the @namespace tag includes - a type, it must also include a name.</p> - <p>You may need to document a namespace whose name includes unusual characters, such as "#" or "!". In these cases, when you document or link + <p>The <code>@namespace</code> tag indicates that an object creates a namespace for its members. You can also write a virtual JSDoc comment that defines a namespace + used by your code.</p> + <p>If a namespace is defined by a symbol other than an object literal, you can include a type expression along with the <code>@namespace</code> tag. If the <code>@namespace</code> tag includes a type, it must also include a name.</p> + <p>You may need to document a namespace whose name includes unusual characters, such as <code>#</code> or <code>!</code>. In these cases, when you document or link to the namespace, you must add quotation marks around the portion of the namespace that includes unusual characters. See the examples below for details.</p> <h2 id="examples">Examples</h2> <figure> @@ -59,8 +57,7 @@ <h2 id="examples">Examples</h2> /** documented as MyNamespace.bar */ bar: 1 }; -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Using the @namespace tag for virtual comments</figcaption><pre class="prettyprint lang-js"><code>/** * A namespace. @@ -72,10 +69,9 @@ <h2 id="examples">Examples</h2> * @function myFunction * @memberof MyNamespace */ -</code></pre> - </figure> - <p>If a @namespace includes a symbol whose name has unusual characters, you must enclose the symbol's name in double quotes. If the symbol's name already - contains one or more double quotes, escape the double quotes with a leading backslash (\).</p> +</code></pre></figure> + <p>If a <code>@namespace</code> includes a symbol whose name has unusual characters, you must enclose the symbol's name in double quotes. If the symbol's + name already contains one or more double quotes, escape the double quotes with a leading backslash (<code>\\</code>).</p> <figure> <figcaption>Using the @namespace tag with unusual member names</figcaption><pre class="prettyprint lang-js"><code>/** @namespace window */ @@ -84,8 +80,7 @@ <h2 id="examples">Examples</h2> * Refer to it as {@link window."!"} (note the double quotes). */ window["!"] = function(msg) { alert(msg); }; -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-module.html">@module</a> @@ -93,8 +88,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-override.html b/tags-override.html index a6dee949..6845c50d 100644 --- a/tags-override.html +++ b/tags-override.html @@ -72,8 +72,7 @@ <h2 id="example">Example</h2> Socket.prototype.open = function() { // ... }; -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-inheritdoc.html">@inheritdoc</a> @@ -81,8 +80,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-package.html b/tags-package.html index a36149d6..39bdb1e5 100644 --- a/tags-package.html +++ b/tags-package.html @@ -39,11 +39,9 @@ <h2>Table of Contents</h2> </ul> <h2 id="syntax">Syntax</h2> <p>With the JSDoc tag dictionary (enabled by default):</p> - <p><code>@package</code> - </p> + <p><code>@package</code></p> <p>With the <a href="https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#jsdoc-tags">Closure Compiler</a> tag dictionary:</p> - <p><code>@package [{typeExpression}]</code> - </p> + <p><code>@package [{typeExpression}]</code></p> <h2 id="overview">Overview</h2> <p>The <code>@package</code> tag marks a symbol as package-private. Typically, this tag indicates that a symbol is available only to code in the same directory as the source file for this symbol. This tag is available in JSDoc 3.5.0 and later.</p> @@ -58,8 +56,7 @@ <h2 id="examples">Examples</h2> /** @package */ this._bar = 1; } -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -87,8 +84,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-param.html b/tags-param.html index 11eafc5c..b52456df 100644 --- a/tags-param.html +++ b/tags-param.html @@ -83,8 +83,7 @@ <h3 id="names-types-and-descriptions">Names, types, and descriptions</h3> function sayHello(somebody) { alert('Hello ' + somebody); } -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Name and type</figcaption><pre class="prettyprint lang-js"><code>/** * @param {string} somebody @@ -92,8 +91,7 @@ <h3 id="names-types-and-descriptions">Names, types, and descriptions</h3> function sayHello(somebody) { alert('Hello ' + somebody); } -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Name, type, and description</figcaption><pre class="prettyprint lang-js"><code>/** * @param {string} somebody Somebody's name. @@ -101,8 +99,7 @@ <h3 id="names-types-and-descriptions">Names, types, and descriptions</h3> function sayHello(somebody) { alert('Hello ' + somebody); } -</code></pre> - </figure> +</code></pre></figure> <p>You can add a hyphen before the description to make it more readable. Be sure to include a space before and after the hyphen.</p> <figure> <figcaption>Name, type, and description, with a hyphen before the description</figcaption><pre class="prettyprint lang-js"><code>/** @@ -111,8 +108,7 @@ <h3 id="names-types-and-descriptions">Names, types, and descriptions</h3> function sayHello(somebody) { alert('Hello ' + somebody); } -</code></pre> - </figure> +</code></pre></figure> <h3 id="parameters-with-properties">Parameters with properties</h3> <p>If a parameter is expected to have a specific property, you can document that property by providing an additional <code>@param</code> tag. For example, if an <code>employee</code> parameter is expected to have <code>name</code> and @@ -151,8 +147,7 @@ <h3 id="parameters-with-properties">Parameters with properties</h3> Project.prototype.assign = function(employees) { // ... }; -</code></pre> - </figure> +</code></pre></figure> <h3 id="optional-parameters-and-default-values">Optional parameters and default values</h3> <p>The following examples show how to indicate that a parameter is optional and has a default value.</p> <figure> @@ -165,8 +160,7 @@ <h3 id="optional-parameters-and-default-values">Optional parameters and default } alert('Hello ' + somebody); } -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>An optional parameter (using Google Closure Compiler syntax)</figcaption><pre class="prettyprint lang-js"><code>/** * @param {string=} somebody - Somebody's name. @@ -177,8 +171,7 @@ <h3 id="optional-parameters-and-default-values">Optional parameters and default } alert('Hello ' + somebody); } -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>An optional parameter and default value</figcaption><pre class="prettyprint lang-js"><code>/** * @param {string} [somebody=John Doe] - Somebody's name. @@ -189,8 +182,7 @@ <h3 id="optional-parameters-and-default-values">Optional parameters and default } alert('Hello ' + somebody); } -</code></pre> - </figure> +</code></pre></figure> <h3 id="multiple-types-and-repeatable-parameters">Multiple types and repeatable parameters</h3> <p>The following examples show how to use type expressions to indicate that a parameter can accept multiple types (or any type), and that a parameter can be provided more than once. See the @@ -207,8 +199,7 @@ <h3 id="multiple-types-and-repeatable-parameters">Multiple types and repeatable } alert('Hello ' + somebody); } -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Allows any type</figcaption><pre class="prettyprint lang-js"><code>/** * @param {*} somebody - Whatever you want. @@ -216,8 +207,7 @@ <h3 id="multiple-types-and-repeatable-parameters">Multiple types and repeatable function sayHello(somebody) { console.log('Hello ' + JSON.stringify(somebody)); } -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Allows a parameter to be repeated</figcaption><pre class="prettyprint lang-js"><code>/** * Returns the sum of all numbers passed to the function. @@ -230,8 +220,7 @@ <h3 id="multiple-types-and-repeatable-parameters">Multiple types and repeatable } return t; } -</code></pre> - </figure> +</code></pre></figure> <h3 id="callback-functions">Callback functions</h3> <p>If a parameter accepts a callback function, you can use the <a href="tags-callback.html"><code>@callback</code> tag</a> to define a callback type, then include the callback type in the <code>@param</code> tag.</p> @@ -251,8 +240,7 @@ <h3 id="callback-functions">Callback functions</h3> function doSomethingAsynchronously(cb) { // code }; -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -271,8 +259,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-private.html b/tags-private.html index ed673475..84ba379a 100644 --- a/tags-private.html +++ b/tags-private.html @@ -39,11 +39,9 @@ <h2>Table of Contents</h2> </ul> <h2 id="syntax">Syntax</h2> <p>With the JSDoc tag dictionary (enabled by default):</p> - <p><code>@private</code> - </p> + <p><code>@private</code></p> <p>With the <a href="https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#jsdoc-tags">Closure Compiler</a> tag dictionary:</p> - <p><code>@private [{typeExpression}]</code> - </p> + <p><code>@private [{typeExpression}]</code></p> <h2 id="overview">Overview</h2> <p>The <code>@private</code> tag marks a symbol as private, or not meant for general use. Private members are not shown in the generated output unless JSDoc is run with the <code>-p/--private</code> command-line option. In JSDoc 3.3.0 and later, you can also use the <a href="about-commandline.html"><code>-a/--access</code> command-line option</a> to change this behavior.</p> @@ -65,8 +63,7 @@ <h2 id="examples">Examples</h2> */ Diary: 2 }; -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -94,8 +91,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-property.html b/tags-property.html index fcf66e0b..5c265a5f 100644 --- a/tags-property.html +++ b/tags-property.html @@ -42,14 +42,14 @@ <h2 id="synonyms">Synonyms</h2> <code>@prop</code> </p> <h2 id="overview">Overview</h2> - <p>The @property tag is a way to easily document a list of static properties of a class, namespace or other object.</p> + <p>The <code>@property</code> tag is a way to easily document a list of static properties of a class, namespace or other object.</p> <p>Normally JSDoc templates would create an entire new page to display information about each level of a nested namespace hierarchy. Sometimes what you really want is to just list all the properties, including nested properties, all together on the same page.</p> <p>Note that property tags must be used in doc comments for the thing that they are properties of, a namespace or a class for example. This tag is intended for - simple collections of static properties, it does not allow you to provide @examples or similar complex information for each property, just the type, name and - description.</p> + simple collections of static properties, it does not allow you to provide <code>@examples</code> or similar complex information for each property, just the + type, name and description.</p> <h2 id="examples">Examples</h2> - <p>In this example we have a namespace named "config." We want all the information about the defaults property, including its nested values, to appear + <p>In this example we have a namespace named <code>config</code>. We want all the information about the defaults property, including its nested values, to appear on the same page with the documentation for config.</p> <figure> <figcaption>A namespace with defaults and nested default properties</figcaption><pre class="prettyprint lang-js"><code>/** diff --git a/tags-protected.html b/tags-protected.html index 0db28faa..6ddd4a65 100644 --- a/tags-protected.html +++ b/tags-protected.html @@ -39,11 +39,9 @@ <h2>Table of Contents</h2> </ul> <h2 id="syntax">Syntax</h2> <p>With the JSDoc tag dictionary (enabled by default):</p> - <p><code>@protected</code> - </p> + <p><code>@protected</code></p> <p>With the <a href="https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#jsdoc-tags">Closure Compiler</a> tag dictionary:</p> - <p><code>@protected [{typeExpression}]</code> - </p> + <p><code>@protected [{typeExpression}]</code></p> <h2 id="overview">Overview</h2> <p>The <code>@protected</code> tag marks a symbol as protected. Typically, this tag indicates that a symbol is only available, or should only be used, within the current module.</p> @@ -58,8 +56,7 @@ <h2 id="examples">Examples</h2> /** @protected */ this._bar = 1; } -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -87,8 +84,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-public.html b/tags-public.html index 1e67acf6..e7988a3a 100644 --- a/tags-public.html +++ b/tags-public.html @@ -54,8 +54,7 @@ <h2 id="examples">Examples</h2> */ var foo = 0; } -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -83,8 +82,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-readonly.html b/tags-readonly.html index 3221150a..a1194ae7 100644 --- a/tags-readonly.html +++ b/tags-readonly.html @@ -32,8 +32,8 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="overview">Overview</h2> - <p>The @readonly tag indicates that a symbol is intended to be read-only. Note this is for the purpose of documentation only - JSDoc won't check whether you've - <em>actually</em> treated the symbol as read-only in your code.</p> + <p>The <code>@readonly</code> tag indicates that a symbol is intended to be read-only. Note this is for the purpose of documentation only - JSDoc won't check + whether you've <em>actually</em> treated the symbol as read-only in your code.</p> <h2 id="examples">Examples</h2> <figure> <figcaption>Using the @readonly tag</figcaption><pre class="prettyprint lang-js"><code>/** @@ -42,8 +42,7 @@ <h2 id="examples">Examples</h2> * @const {number} */ const FOO = 1; -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Using the @readonly tag with a getter</figcaption><pre class="prettyprint lang-js"><code>/** * Options for ordering a delicious slice of pie. @@ -62,13 +61,11 @@ <h2 id="examples">Examples</h2> return this.plain + ' with ice cream'; } }; -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-requires.html b/tags-requires.html index a0c59159..fd9f9172 100644 --- a/tags-requires.html +++ b/tags-requires.html @@ -35,11 +35,11 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@requires <someModuleName></code> - </p> + <p><code>@requires <someModuleName></code></p> <h2 id="overview">Overview</h2> - <p>The @requires tag allows you to document that a module is needed to use this code. A JSDoc comment can have multiple @require tags. The module name can be specified - as "moduleName" or "module:moduleName"; both forms will be interpreted as modules.</p> + <p>The <code>@requires</code> tag allows you to document that a module is needed to use this code. A JSDoc comment can have multiple <code>@require</code> tags. + The module name can be specified as <code>moduleName</code> or + <code>module:moduleName</code>; both forms will be interpreted as modules.</p> <p>JSDoc does not attempt to process the module that is being included. If you want the module to be included in the documentation, you must include the module in the list of JavaScript files to process. </p> @@ -53,13 +53,11 @@ <h2 id="examples">Examples</h2> * @requires xyzcorp/helper.ShinyWidget#polish */ function Widgetizer() {} -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-see.html b/tags-see.html index 97d6253b..fa3b1d21 100644 --- a/tags-see.html +++ b/tags-see.html @@ -39,14 +39,12 @@ <h2>Table of Contents</h2> </ul> <h2 id="syntax">Syntax</h2> <ul> - <li><code>@see <namepath></code> - </li> - <li><code>@see <text></code> - </li> + <li><code>@see <namepath></code></li> + <li><code>@see <text></code></li> </ul> <h2 id="overview">Overview</h2> - <p>The @see tag allows you to refer to another symbol or resource that may be related to the one being documented. You can provide either a symbol's namepath - or free-form text. If you provide a namepath, JSDoc's default template automatically converts the namepath to a link.</p> + <p>The <code>@see</code> tag allows you to refer to another symbol or resource that may be related to the one being documented. You can provide either a symbol's + namepath or free-form text. If you provide a namepath, JSDoc's default template automatically converts the namepath to a link.</p> <h2 id="examples">Examples</h2> <figure> <figcaption>Using the @see tag</figcaption><pre class="prettyprint lang-js"><code>/** @@ -62,8 +60,7 @@ <h2 id="examples">Examples</h2> * @see {@link http://github.com|GitHub} */ function bar() {} -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-inline-link.html">{@link}</a> @@ -71,8 +68,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-since.html b/tags-since.html index d0a8e50a..b2a075f2 100644 --- a/tags-since.html +++ b/tags-since.html @@ -38,10 +38,9 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@since <versionDescription></code> - </p> + <p><code>@since <versionDescription></code></p> <h2 id="overview">Overview</h2> - <p>The @since tag indicates that a class, method, or other symbol was added in a specific version.</p> + <p>The <code>@since</code> tag indicates that a class, method, or other symbol was added in a specific version.</p> <h2 id="examples">Examples</h2> <figure> <figcaption>Using the @since tag</figcaption><pre class="prettyprint lang-js"><code>/** @@ -49,8 +48,7 @@ <h2 id="examples">Examples</h2> * @since 1.0.1 */ function UserRecord() {} -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-version.html">@version</a> @@ -58,8 +56,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-static.html b/tags-static.html index 9bc168be..e9c5cd2f 100644 --- a/tags-static.html +++ b/tags-static.html @@ -35,10 +35,10 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="overview">Overview</h2> - <p>The @static tag indicates that a symbol is contained within a parent and can be accessed without instantiating the parent.</p> - <p>Using the @static tag will override a symbol's default scope, with one exception: Symbols in global scope will remain global.</p> + <p>The <code>@static</code> tag indicates that a symbol is contained within a parent and can be accessed without instantiating the parent.</p> + <p>Using the <code>@static</code> tag will override a symbol's default scope, with one exception: Symbols in global scope will remain global.</p> <h2 id="examples">Examples</h2> - <p>The following example has the same effect as writing "@function MyNamespace.myFunction" and omitting the @memberof and @static tags:</p> + <p>The following example has the same effect as writing <code>@function MyNamespace.myFunction</code> and omitting the <code>@memberof</code> and <code>@static</code> tags:</p> <figure> <figcaption>Using @static in a virtual comment</figcaption><pre class="prettyprint lang-js"><code>/** @namespace MyNamespace */ @@ -47,8 +47,7 @@ <h2 id="examples">Examples</h2> * @memberof MyNamespace * @static */ -</code></pre> - </figure> +</code></pre></figure> <p>The following example forces a module's inner member to be documented as a static member:</p> <figure> <figcaption>Using @static to override the default scope</figcaption><pre class="prettyprint lang-js"><code>/** @module Rollerskate */ @@ -59,8 +58,7 @@ <h2 id="examples">Examples</h2> * @static */ var wheel = 1; -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -76,8 +74,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-summary.html b/tags-summary.html index eaddc799..19ef4f99 100644 --- a/tags-summary.html +++ b/tags-summary.html @@ -38,10 +38,9 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@summary Summary goes here.</code> - </p> + <p><code>@summary Summary goes here.</code></p> <h2 id="overview">Overview</h2> - <p>The @summary tag is a shorter version of the full description. It can be added to any doclet.</p> + <p>The <code>@summary</code> tag is a shorter version of the full description. It can be added to any doclet.</p> <h2 id="examples">Examples</h2> <pre class="prettyprint lang-js"><code>/** * A very long, verbose, wordy, long-winded, tedious, verbacious, tautological, @@ -63,8 +62,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-this.html b/tags-this.html index 48e0d3df..6d8e1ae4 100644 --- a/tags-this.html +++ b/tags-this.html @@ -38,12 +38,12 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@this <namePath></code> - </p> + <p><code>@this <namePath></code></p> <h2 id="overview">Overview</h2> - <p>The @this tag indicates what the <code>this</code> keyword refers to when used within another symbol.</p> + <p>The <code>@this</code> tag indicates what the <code>this</code> keyword refers to when used within another symbol.</p> <h2 id="examples">Examples</h2> - <p>In the following example, the @this tag causes "this.name" to be documented as "Greeter#name" rather than a global symbol called "name".</p> + <p>In the following example, the <code>@this</code> tag causes <code>this.name</code> to be documented as <code>Greeter#name</code> rather than a global symbol + called <code>name</code>.</p> <pre class="prettyprint lang-js"><code>/** @constructor */ function Greeter(name) { setName.apply(this, name); @@ -62,8 +62,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-throws.html b/tags-throws.html index 330d4832..94d33ada 100644 --- a/tags-throws.html +++ b/tags-throws.html @@ -43,42 +43,36 @@ <h2 id="synonyms">Synonyms</h2> </p> <h2 id="syntax">Syntax</h2> <ul> - <li><code>@throws free-form description</code> - </li> - <li><code>@throws {<type>}</code> - </li> - <li><code>@throws {<type>} free-form description</code> - </li> + <li><code>@throws free-form description</code></li> + <li><code>@throws {<type>}</code></li> + <li><code>@throws {<type>} free-form description</code></li> </ul> <h2 id="overview">Overview</h2> - <p>The @throws tag allows you to document an error that a function might throw. You can include the @throws tag more than once in a single JSDoc comment.</p> + <p>The <code>@throws</code> tag allows you to document an error that a function might throw. You can include the + <code>@throws</code> tag more than once in a single JSDoc comment.</p> <h2 id="examples">Examples</h2> <figure> <figcaption>Using the @throws tag with a type</figcaption><pre class="prettyprint lang-js"><code>/** * @throws {InvalidArgumentException} */ function foo(x) {} -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Using the @throws tag with a description</figcaption><pre class="prettyprint lang-js"><code>/** * @throws Will throw an error if the argument is null. */ function bar(x) {} -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>Using the @throws tag with a type and description</figcaption><pre class="prettyprint lang-js"><code>/** * @throws {DivideByZero} Argument x must be non-zero. */ function baz(x) {} -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-todo.html b/tags-todo.html index 1de584c0..e16a4554 100644 --- a/tags-todo.html +++ b/tags-todo.html @@ -35,10 +35,10 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@todo text describing thing to do.</code> - </p> + <p><code>@todo text describing thing to do.</code></p> <h2 id="overview">Overview</h2> - <p>The @todo tag allows you to document tasks to be completed for some part of your code. You can use the @todo tag more than once in a single JSDoc comment.</p> + <p>The <code>@todo</code> tag allows you to document tasks to be completed for some part of your code. You can use the <code>@todo</code> tag more than once in + a single JSDoc comment.</p> <h2 id="examples">Examples</h2> <figure> <figcaption>Using the @todo tag</figcaption><pre class="prettyprint lang-js"><code>/** @@ -48,13 +48,11 @@ <h2 id="examples">Examples</h2> function foo() { // write me } -</code></pre> - </figure> +</code></pre></figure> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-tutorial.html b/tags-tutorial.html index b2899274..08aed73a 100644 --- a/tags-tutorial.html +++ b/tags-tutorial.html @@ -53,8 +53,7 @@ <h2 id="examples">Examples</h2> * @tutorial tutorial-2 */ function MyClass() {} -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -70,8 +69,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-type.html b/tags-type.html index 37f4637b..d90927f4 100644 --- a/tags-type.html +++ b/tags-type.html @@ -38,11 +38,10 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@type {typeName}</code> - </p> + <p><code>@type {typeName}</code></p> <h2 id="overview">Overview</h2> - <p>The @type tag allows you to provide a type expression identifying the type of value that a symbol may contain, or the type of value returned by a function. You - can also include type expressions with many other JSDoc tags, such as the <a href="tags-param.html">@param tag</a>.</p> + <p>The <code>@type</code> tag allows you to provide a type expression identifying the type of value that a symbol may contain, or the type of value returned by + a function. You can also include type expressions with many other JSDoc tags, such as the <a href="tags-param.html"><code>@param</code> tag</a>.</p> <p>A type expression can include the JSDoc namepath to a symbol (for example, <code>myNamespace.MyClass</code>); a built-in JavaScript type (for example, <code>string</code>); or a combination of these. You can use any <a href="https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler#type-expressions">Google Closure Compiler type expression</a>, @@ -280,9 +279,8 @@ <h2 id="examples">Examples</h2> var foo; /** @type {number} */ var bar = 1; -</code></pre> - </figure> - <p>In many cases, you can include a type expression as part of another tag, rather than including a separate @type tag in your JSDoc comment.</p> +</code></pre></figure> + <p>In many cases, you can include a type expression as part of another tag, rather than including a separate <code>@type</code> tag in your JSDoc comment.</p> <figure> <figcaption>Type expressions can accompany many tags.</figcaption><pre class="prettyprint lang-js"><code>/** * @type {number} @@ -294,8 +292,7 @@ <h2 id="examples">Examples</h2> /** @const {number} */ var FOO = 1; -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -314,8 +311,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-typedef.html b/tags-typedef.html index 2401234b..4f839129 100644 --- a/tags-typedef.html +++ b/tags-typedef.html @@ -38,13 +38,12 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@typedef [<type>] <namepath></code> - </p> + <p><code>@typedef [<type>] <namepath></code></p> <h2 id="overview">Overview</h2> - <p>The @typedef tag is useful for documenting custom types, particularly if you wish to refer to them repeatedly. These types can then be used within other tags - expecting a type, such as - <a href="tags-type.html">@type</a> or <a href="tags-param.html">@param</a>.</p> - <p>Use the <a href="tags-callback.html">@callback</a> tag to document the type of callback functions.</p> + <p>The <code>@typedef</code> tag is useful for documenting custom types, particularly if you wish to refer to them repeatedly. These types can then be used within + other tags expecting a type, such as + <a href="tags-type.html"><code>@type</code></a> or <a href="tags-param.html"><code>@param</code></a>.</p> + <p>Use the <a href="tags-callback.html"><code>@callback</code></a> tag to document the type of callback functions.</p> <h2 id="examples">Examples</h2> <p>This example defines a union type for parameters that can contain either numbers or strings that represent numbers.</p> <figure> @@ -59,8 +58,7 @@ <h2 id="examples">Examples</h2> */ function setMagicNumber(x) { } -</code></pre> - </figure> +</code></pre></figure> <p>This example defines a more complex type, an object with several properties, and sets its namepath so it will be displayed along with the class that uses the type. Because the type definition is not actually exposed by the class, it is customary to document the type definition as an inner member.</p> <figure> @@ -79,8 +77,7 @@ <h2 id="examples">Examples</h2> * containing all three components of the Triforce. */ function WishGranter(triforce) {} -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -96,8 +93,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-variation.html b/tags-variation.html index e835ac05..84b0f3c6 100644 --- a/tags-variation.html +++ b/tags-variation.html @@ -38,19 +38,17 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="syntax">Syntax</h2> - <p><code>@variation <variationNumber></code> - </p> + <p><code>@variation <variationNumber></code></p> <h2 id="overview">Overview</h2> <p>Sometimes your code may include multiple symbols with the same longname. For example, you might have both a global class and a top-level namespace called <code>Widget</code>. - In cases such as these, what does "{@link Widget}" or "@memberof Widget" mean? The global namespace, or the global class?</p> - <p>Variations help JSDoc distinguish between different symbols with the same longname. For example, if "@variation 2" is added to the JSDoc comment for - the Widget class, "{@link Widget(2)}" will refer to the class, and "{@link Widget}" will refer to the namespace. Alternatively, you can - include the variation when you specify the symbol's with tags such as <a href="tags-alias.html">@alias</a> or <a href="tags-name.html">@name</a> (for example, - "@alias Widget(2)").</p> - <p>You can provide any value with the @variation tag, as long as the combination of the value and the longname results in a globally unique version of the longname. - As a best practice, use a predictable pattern for choosing the values, which will make it easier for you to document your code.</p> + In cases such as these, what does + <code>{@link Widget}</code> or <code>@memberof Widget</code> mean? The global namespace, or the global class?</p> + <p>Variations help JSDoc distinguish between different symbols with the same longname. For example, if + <code>@variation 2</code> is added to the JSDoc comment for the Widget class, <code>{@link Widget(2)}</code> will refer to the class, and <code>{@link Widget}</code> will refer to the namespace. Alternatively, you can include the variation when you specify the symbol's with tags such as <a href="tags-alias.html"><code>@alias</code></a> or <a href="tags-name.html"><code>@name</code></a> (for example, <code>@alias Widget(2)</code>).</p> + <p>You can provide any value with the <code>@variation</code> tag, as long as the combination of the value and the longname results in a globally unique version + of the longname. As a best practice, use a predictable pattern for choosing the values, which will make it easier for you to document your code.</p> <h2 id="examples">Examples</h2> - <p>The following example uses the @variation tag to distinguish between the Widget class and the Widget namespace. + <p>The following example uses the <code>@variation</code> tag to distinguish between the Widget class and the Widget namespace. </p> <figure> <figcaption>Using the @variation tag</figcaption><pre class="prettyprint lang-js"><code>/** @@ -80,8 +78,7 @@ <h2 id="examples">Examples</h2> */ metallic: true }; -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <ul> <li> @@ -94,8 +91,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-version.html b/tags-version.html index 8016f372..8a679de0 100644 --- a/tags-version.html +++ b/tags-version.html @@ -35,7 +35,7 @@ <h2>Table of Contents</h2> </li> </ul> <h2 id="overview">Overview</h2> - <p>Documents the version of an item. The text following the @version tag will be used to denote the version of the item.</p> + <p>Documents the version of an item. The text following the <code>@version</code> tag will be used to denote the version of the item.</p> <h2 id="examples">Examples</h2> <figure> <figcaption>Using the @version tag</figcaption><pre class="prettyprint lang-js"><code>/** @@ -47,8 +47,7 @@ <h2 id="examples">Examples</h2> function solver(a, b) { return b / a; } -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-since.html">@since</a> @@ -56,8 +55,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"> diff --git a/tags-yields.html b/tags-yields.html index 1f28fe94..99c36a8e 100644 --- a/tags-yields.html +++ b/tags-yields.html @@ -45,8 +45,7 @@ <h2 id="synonyms">Synonyms</h2> <code>@yield</code> </p> <h2 id="syntax">Syntax</h2> - <p><code>@yields [{type}] [description]</code> - </p> + <p><code>@yields [{type}] [description]</code></p> <h2 id="overview">Overview</h2> <p>The <code>@yields</code> tag documents the value that is yielded by a generator function. This tag is available in JSDoc 3.5.0 and later.</p> <p>If you are documenting a regular function, use the <a href="tags-returns.html"><code>@returns</code> tag</a> instead of this tag. @@ -59,8 +58,7 @@ <h2 id="examples">Examples</h2> * @yields {number} */ function* fibonacci() {} -</code></pre> - </figure> +</code></pre></figure> <figure> <figcaption>@yields tag with a type and description</figcaption><pre class="prettyprint lang-js"><code>/** * Generate the Fibonacci sequence of numbers. @@ -68,8 +66,7 @@ <h2 id="examples">Examples</h2> * @yields {number} The next number in the Fibonacci sequence. */ function* fibonacci() {} -</code></pre> - </figure> +</code></pre></figure> <h2 id="related-links">Related Links</h2> <p> <a href="tags-returns.html">@returns</a> @@ -77,8 +74,7 @@ <h2 id="related-links">Related Links</h2> </article> <footer> <a class="license-badge" href="http://creativecommons.org/licenses/by-sa/3.0/"> - <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /> - </a> + <img alt="Creative Commons License" class="license-badge" src="images/cc-by-sa.svg" width="80" height="15" /></a> <br> Copyright © 2011-2017 the <a href="https://github.com/jsdoc3/jsdoc3.github.com/contributors">contributors</a> to the JSDoc 3 documentation project. <br> This website is <a href="https://github.com/jsdoc3/jsdoc3.github.com">open source</a> and is licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">