forked from jsdoc/jsdoc.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtags-function.html
More file actions
87 lines (83 loc) · 2.82 KB
/
tags-function.html
File metadata and controls
87 lines (83 loc) · 2.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<!-- THIS IS A GENERATED FILE. DO NOT EDIT. -->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="Describe a function or method.">
<title>Use JSDoc: @function</title>
<link rel="stylesheet" href="styles/usejsdoc.css">
<link rel="stylesheet" href="styles/prettify.css">
<link rel="stylesheet" href="styles/css3-github-ribbon.css">
<script src="scripts/prettify.js"></script>
</head>
<body>
<header>
<a href="./index.html">@use JSDoc</a>
</header>
<article>
<h1>@function</h1>
<h2>Table of Contents</h2>
<ul>
<li>
<a href="#synonyms">Synonyms</a>
</li>
<li>
<a href="#syntax">Syntax</a>
</li>
<li>
<a href="#overview">Overview</a>
</li>
<li>
<a href="#examples">Examples</a>
</li>
</ul>
<h2 id="synonyms">Synonyms</h2>
<ul>
<li>
<code>@func</code>
</li>
<li>
<code>@method</code>
</li>
</ul>
<h2 id="syntax">Syntax</h2>
<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>
<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>
<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>
</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>
<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/">
Creative Commons Attribution-ShareAlike 3.0 Unported License</a>.
</footer>
<script type="text/javascript">
prettyPrint();
</script>
</body>
</html>