|
4 | 4 |
|
5 | 5 | <head> |
6 | 6 | <meta charset="utf-8"> |
7 | | - <meta name="description" content="[todo] Remove this from the final output."> |
| 7 | + <meta name="description" content="Omit a symbol from the documentation."> |
8 | 8 | <title>Use JSDoc: @ignore</title> |
9 | 9 | <link rel="stylesheet" href="styles/usejsdoc.css"> |
10 | 10 | <link rel="stylesheet" href="styles/prettify.css"> |
@@ -32,10 +32,42 @@ <h2>Table of Contents</h2> |
32 | 32 | </li> |
33 | 33 | </ul> |
34 | 34 | <h2 id="overview">Overview</h2> |
35 | | - <p>TODO</p> |
| 35 | + <p>The <code>@ignore</code> tag indicates that a symbol in your code should never appear in the documentation. This tag takes precedence over all others.</p> |
| 36 | + <p>For most JSDoc templates, including the default template, the <code>@ignore</code> tag has the following effects:</p> |
| 37 | + <ul> |
| 38 | + <li>If you use the <code>@ignore</code> tag with the <code>@class</code> or <code>@module</code> tag, the entire class or module will be omitted from the documentation.</li> |
| 39 | + <li>If you use the <code>@ignore</code> tag with the <code>@namespace</code> tag, you must also add the <code>@ignore</code> tag to any child classes and namespaces. |
| 40 | + Otherwise, your documentation will show the child classes and namespaces, but with incomplete names.</li> |
| 41 | + </ul> |
36 | 42 | <h2 id="examples">Examples</h2> |
| 43 | + <p>In the following example, <code>Jacket</code> and <code>Jacket#color</code> will not appear in the documentation.</p> |
| 44 | + <figure> |
| 45 | + <figcaption>Class with <code>@ignore</code> tag</figcaption><pre class="prettyprint lang-js"><code>/** |
| 46 | + * @class |
| 47 | + * @ignore |
| 48 | + */ |
| 49 | +function Jacket() { |
| 50 | + /** The jacket's color. */ |
| 51 | + this.color = null; |
| 52 | +} |
| 53 | +</code></pre> |
| 54 | + </figure> |
| 55 | + <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> |
37 | 56 | <figure> |
38 | | - <figcaption>Example goes here</figcaption><pre class="prettyprint lang-js"><code>// todo |
| 57 | + <figcaption>Namespace with child class</figcaption><pre class="prettyprint lang-js"><code>/** |
| 58 | + * @namespace |
| 59 | + * @ignore |
| 60 | + */ |
| 61 | +var Clothes = { |
| 62 | + /** |
| 63 | + * @class |
| 64 | + * @ignore |
| 65 | + */ |
| 66 | + Jacket: function() { |
| 67 | + /** The jacket's color. */ |
| 68 | + this.color = null; |
| 69 | + } |
| 70 | +}; |
39 | 71 | </code></pre> |
40 | 72 | </figure> |
41 | 73 | </article> |
|
0 commit comments