Methods
staticaddEventListeners(data)
Iterates through all the doclets in data
, ensuring that if a method @listens
to an event,
then that event has a listeners
array with the longname of the listener in it.
Parameters:
Name | Type | Description |
---|---|---|
data
|
TAFFY | The TaffyDB database to search. |
staticcreateLink(doclet) → string
Create a URL that points to the generated documentation for the doclet.
If a doclet corresponds to an output file (for example, if the doclet represents a class), the
URL will consist of a filename.
If a doclet corresponds to a smaller portion of an output file (for example, if the doclet
represents a method), the URL will consist of a filename and a fragment ID.
Parameters:
Name | Type | Description |
---|---|---|
doclet
|
module:jsdoc/doclet.Doclet | The doclet that will be used to create the URL. |
Returns:
The URL to the generated documentation for the doclet.
- Type:
- string
staticgetAncestorLinks(data, doclet, cssClassopt) → string[]
Retrieve links to a member's ancestors.
Parameters:
Name | Type | Description |
---|---|---|
data
|
TAFFY | The TaffyDB database to search. |
doclet
|
Object | The doclet whose ancestors will be retrieved. |
cssClass opt
|
string | The CSS class to include in the |
Returns:
HTML links to a member's ancestors.
- Type:
- string[]
staticgetAncestors(data, doclet) → module:jsdoc/doclet.Doclet[]
Retrieve an ordered list of doclets for a symbol's ancestors.
Parameters:
Name | Type | Description |
---|---|---|
data
|
TAFFY | The TaffyDB database to search. |
doclet
|
Object | The doclet whose ancestors will be retrieved. |
Returns:
A array of ancestor doclets, sorted from most to
least distant.
- Type:
- module:jsdoc/doclet.Doclet[]
staticgetAttribs(d) → string[]
Retrieve the member attributes for a doclet (for example, virtual
, static
, and
readonly
).
Parameters:
Name | Type | Description |
---|---|---|
d
|
object | The doclet whose attributes will be retrieved. |
Returns:
The member attributes for the doclet.
- Type:
- string[]
staticgetMembers(data) → object
Retrieve all of the following types of members from a set of doclets:
- Classes
- Externals
- Globals
- Mixins
- Modules
- Namespaces
- Events
Parameters:
Name | Type | Description |
---|---|---|
data
|
TAFFY | The TaffyDB database to search. |
Returns:
An object with classes
, externals
, globals
, mixins
, modules
,
events
, and namespaces
properties. Each property contains an array of objects.
- Type:
- object
staticgetSignatureParams(d, optClassopt) → string[]
Retrieve names of the parameters that the member accepts. If a value is provided for optClass
,
the names of optional parameters will be wrapped in a <span>
tag with that class.
Parameters:
Name | Type | Description |
---|---|---|
d
|
object | The doclet whose parameter names will be retrieved. |
optClass opt
|
string | The class to assign to the |
Returns:
An array of parameter names, with or without <span>
tags wrapping the
names of optional parameters.
- Type:
- string[]
staticgetSignatureReturns(d, cssClassopt) → string[]
Retrieve links to types that the member can return or yield.
Parameters:
Name | Type | Description |
---|---|---|
d
|
Object | The doclet whose types will be retrieved. |
cssClass opt
|
string | The CSS class to include in the |
Returns:
HTML links to types that the member can return or yield.
- Type:
- string[]
staticgetSignatureTypes(d, cssClassopt) → string[]
Retrieve links to allowed types for the member.
Parameters:
Name | Type | Description |
---|---|---|
d
|
Object | The doclet whose types will be retrieved. |
cssClass opt
|
string | The CSS class to include in the |
Returns:
HTML links to allowed types for the member.
- Type:
- string[]
staticgetUniqueId(filename, doclet) → string
Convert a doclet to an identifier that is unique for a specified filename.
Identifiers are not considered unique if they are capitalized differently but are otherwise
identical.
Parameters:
Name | Type | Description |
---|---|---|
filename
|
string | The file in which the identifier will be used. |
doclet
|
string | The doclet to convert. |
Returns:
A unique identifier based on the file and doclet.
- Type:
- string
staticlongnamesToTree(longnames, doclets) → Object
Convert an array of doclet longnames into a tree structure, optionally attaching doclets to the
tree.
Parameters:
Name | Type | Description |
---|---|---|
longnames
|
string[] | The longnames to convert into a tree. |
doclets
|
Object.<string, module:jsdoc/doclet.Doclet> | The doclets to attach to a tree. |
- Source:
- node_modules/jsdoc/lib/jsdoc/util/templateHelper.js, line 1012
- See:
- module:jsdoc/name.longnamesToTree
Returns:
A tree with information about each longname.
- Type:
- Object
staticprune(data) → TAFFY
Remove members that will not be included in the output, including:
- Undocumented members.
- Members tagged
@ignore
. - Members of anonymous classes.
- Members tagged
@private
, unless theprivate
option is enabled. - Members tagged with anything other than specified by the
access
options.
Parameters:
Name | Type | Description |
---|---|---|
data
|
TAFFY | The TaffyDB database to prune. |
Returns:
The pruned database.
- Type:
- TAFFY
staticresolveAuthorLinks(str) → string
Convert tag text like Jane Doe <jdoe@example.org>
into a mailto:
link.
Parameters:
Name | Type | Description |
---|---|---|
str
|
string | The tag text. |
Returns:
The linkified text.
- Type:
- string
staticresolveLinks(str) → string
Find ...
and ...
inline tags and turn them into HTML links.
Parameters:
Name | Type | Description |
---|---|---|
str
|
string | The string to search for |
Returns:
The linkified text.
- Type:
- string
staticsetTutorials(root)
Sets tutorials map.
Parameters:
Name | Type | Description |
---|---|---|
root
|
jsdoc.tutorial.Tutorial | Root tutorial node. |
innerbuildLink(longname, linkTextopt, options) → string
Build an HTML link to the symbol with the specified longname. If the longname is not
associated with a URL, this method simply returns the link text, if provided, or the longname.
The longname
parameter can also contain a URL rather than a symbol's longname.
This method supports type applications that can contain one or more types, such as
Array.<MyClass>
or Array.<(MyClass|YourClass)>
. In these examples, the method attempts to
replace Array
, MyClass
, and YourClass
with links to the appropriate types. The link text
is ignored for type applications.
Parameters:
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
longname
|
string | The longname (or URL) that is the target of the link. |
||||||||||||||||||
linkText opt
|
string | The text to display for the link, or |
||||||||||||||||||
options
|
Object | Options for building the link. Properties
|
Returns:
The HTML link, or the link text if the link is not available.
- Type:
- string
innerfind(data, spec) → object[]
Find items in a TaffyDB database that match the specified key-value pairs.
Parameters:
Name | Type | Description |
---|---|---|
data
|
TAFFY | The TaffyDB database to search. |
spec
|
|
Key-value pairs to match against (for example, |
Returns:
The matching items.
- Type:
- object[]
innergetUniqueFilename(str) → string
Convert a string to a unique filename, including an extension.
Filenames are cached to ensure that they are used only once. For example, if the same string is
passed in twice, two different filenames will be returned.
Also, filenames are not considered unique if they are capitalized differently but are otherwise
identical.
Parameters:
Name | Type | Description |
---|---|---|
str
|
string | The string to convert. |
Returns:
The filename to use for the string.
- Type:
- string
innerlinkto(longname, linkTextopt, cssClassopt, fragmentIdopt) → string
Retrieve an HTML link to the symbol with the specified longname. If the longname is not
associated with a URL, this method simply returns the link text, if provided, or the longname.
The longname
parameter can also contain a URL rather than a symbol's longname.
This method supports type applications that can contain one or more types, such as
Array.<MyClass>
or Array.<(MyClass|YourClass)>
. In these examples, the method attempts to
replace Array
, MyClass
, and YourClass
with links to the appropriate types. The link text
is ignored for type applications.
Parameters:
Name | Type | Description |
---|---|---|
longname
|
string | The longname (or URL) that is the target of the link. |
linkText opt
|
string | The text to display for the link, or |
cssClass opt
|
string | The CSS class (or classes) to include in the link's |
fragmentId opt
|
string | The fragment identifier (for example, |
Returns:
The HTML link, or a plain-text string if the link is not available.
- Type:
- string
innertoTutorial(tutorial, content, missingOptsopt) → string
Retrieve a link to a tutorial, or the name of the tutorial if the tutorial is missing. If the
missingOpts
parameter is supplied, the names of missing tutorials will be prefixed by the
specified text and wrapped in the specified HTML tag and CSS class.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tutorial
|
string | The name of the tutorial. |
||||||||||||
content
|
string | The link text to use. |
||||||||||||
missingOpts opt
|
object | Options for displaying the name of a missing tutorial. Properties
|
- Source:
- node_modules/jsdoc/lib/jsdoc/util/templateHelper.js, line 478
- To Do:
- Deprecate missingOpts once we have a better error-reporting mechanism.
Returns:
An HTML link to the tutorial, or the name of the tutorial with the specified
options.
- Type:
- string