jsdoc/doclet.Doclet(docletSrc, metaopt)
Represents a single JSDoc comment.
Constructor
new Doclet(docletSrc, metaopt)
Create a doclet.
Parameters:
Name | Type | Description |
---|---|---|
docletSrc
|
string | The raw source code of the jsdoc comment. |
meta opt
|
object | Properties describing the code related to this comment. |
Namespaces
Members
augments string[]
A list of symbols that are augmented by this one, if any.
borrowed string[]
A list of symbols that are borrowed by this one, if any.
comment
The original text of the comment from the source code.
longname string
The fully resolved symbol name.
memberof string
The longname of the symbol that contains this one, if any.
mixes string[]
A list of symbols that are mixed into this one, if any.
Methods
addTag(title, textopt)
Add a tag to the doclet.
Parameters:
Name | Type | Description |
---|---|---|
title
|
string | The title of the tag being added. |
text opt
|
string | The text of the tag being added. |
augment(base)
Add a symbol to the doclet's augments
array.
Parameters:
Name | Type | Description |
---|---|---|
base
|
string | The longname of the base symbol. |
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. |
postProcess()
Called once after all tags have been added.
setLongname(name)
Set the doclet's longname
property.
Parameters:
Name | Type | Description |
---|---|---|
name
|
string | The longname for the doclet. |
setMemberof(sid)
Set the doclet's memberof
property.
Parameters:
Name | Type | Description |
---|---|---|
sid
|
string | The longname of the doclet's parent symbol. |
setMeta(meta)
Set the meta
property of this doclet.
Parameters:
Name | Type | Description |
---|---|---|
meta
|
object |
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 |
Throws:
-
If the scope name is not recognized.
- Type
- Error