Class: Doclet

jsdoc/doclet.Doclet

Represents a single JSDoc comment.

Constructor

new Doclet(docletSrc, metaopt)

Parameters:
Name Type Attributes Description
docletSrc string The raw source code of the jsdoc comment.
meta object <optional>
Properties describing the code related to this comment.
Source:

Members

comment

The original text of the comment from the source code.
Source:

Methods

addTag(title, textopt)

Add a tag to the doclet.
Parameters:
Name Type Attributes Description
title string The title of the tag being added.
text string <optional>
The text of the tag being added.
Source:

augment(base)

Add a symbol to the doclet's `augments` array.
Parameters:
Name Type Description
base string The longname of the base symbol.
Source:

borrow(source, target)

Add a symbol to this doclet's `borrowed` array.
Parameters:
Name Type Description
source string The longname of the symbol that is the source.
target string The name the symbol is being assigned to.
Source:

postProcess()

Called once after all tags have been added.
Source:

setLongname(name)

Set the doclet's `longname` property.
Parameters:
Name Type Description
name string The longname for the doclet.
Source:

setMemberof(sid)

Set the doclet's `memberof` property.
Parameters:
Name Type Description
sid string The longname of the doclet's parent symbol.
Source:

setMeta(meta)

Set the `meta` property of this doclet.
Parameters:
Name Type Description
meta object
Source:

setScope(scope)

Set the doclet's `scope` property. Must correspond to a scope name that is defined in module:jsdoc/name.SCOPE.NAMES.
Parameters:
Name Type Description
scope module:jsdoc/name.SCOPE.NAMES The scope for the doclet relative to the symbol's parent.
Source:
Throws:
If the scope name is not recognized.
Type
Error