Module: jsdoc/src/visitor

Classes

JsdocCommentFound
JsdocCommentFound
SymbolFound
SymbolFound
Visitor
Visitor

Members

Visitor

Source:

basename

Source:

basename

Source:

basename

Source:

basename

Source:

code

Source:

code

Source:

combined

Source:

comment

Source:

comment

Source:

comments

Source:

comments

Source:

defaultValues

Source:

description

Source:

doclet

Source:

doclet

Source:

doclet

Source:

doclet

Source:

doclet

Source:

documentedParams

Source:

documentedParams

Source:

documentedParams

Source:

e

Source:

e

Source:

e

Source:

e

Source:

e

Source:

e

Source:

e

Source:

e

Source:

e

Source:

e

Source:

e

Source:

e

Source:

e

Source:

e

Source:

e

Source:

e

Source:

e

Source:

enclosingScope

Source:

finishers

Source:

jsdoc

Source:

knownParams

Source:

lastTrailingComment

Source:

leadingComments

Source:

loc

Source:

name

Source:

nextProgramNode

Source:

nextProgramNodeIndex

Source:

param

Source:

paramName

Source:

params

Source:

parent

Source:

parent

Source:

parent

Source:

parentDoclet

Source:

parentDoclet

Source:

parentDoclet

Source:

range

Source:

rawComment

Source:

restNode

Source:

restParam

Source:

Syntax

Source:

type

Source:

type

Source:

value

Source:

value

Source:

Methods

findDefaultParams(params) → {Array.<Object>}

Given an array of nodes that represent function parameters, find the nodes for the default parameters, if any.
Parameters:
Name Type Description
params Array.<Object> An array of nodes that represent function parameters.
Source:
Returns:
The nodes for the default parameters.
Type
Array.<Object>

findRestParam(params) → {Object}

Given an array of nodes that represent function parameters, find the node for the rest parameter, if any.
Parameters:
Name Type Description
params Array.<Object> An array of nodes that represent function parameters.
Source:
Returns:
The node for the rest parameter.
Type
Object

getLeadingJsdocComment()

Source:

getParentDocletFromEvent()

Source:

getRawComment(commentnon-null)

Get the raw comment string for a block comment node.
Parameters:
Name Type Description
comment Object A comment node with `type` and `value` properties.
Source:

hasComments()

Source:

isBlockComment(commentnon-null) → {boolean}

Check whether a comment node represents a block comment.
Parameters:
Name Type Description
comment Object A comment node with `type` and `value` properties.
Source:
Returns:
`true` if the comment is a block comment, `false` otherwise.
Type
boolean

makeAsyncFunctionFinisher() → {function}

Create a function that will add an `async` property to the doclet for async functions.
Source:
Returns:
A function that adds an `async` property to the doclet of async functions.
Type
function

makeConstructorFinisher(parser) → {function}

For method definitions that are constructors, create a function that will merge portions of the constructor's doclet into the class's doclet, provided that a doclet exists for the class. Merging the constructor's documentation allows ES 2015 classes to be documented in a natural way, with separate JSDoc comments for the class and its constructor.
Parameters:
Name Type Description
parser module:jsdoc/src/parser.Parser The JSDoc parser.
Source:
Returns:
A function that merges the constructor's doclet into the class's doclet.
Type
function

makeDefaultParamFinisher() → {function}

For functions that may have at least one parameter with default values, create a function that will automatically add the parameters' default values to the function's documentation. If any default value is already documented, the function's doclet will remain unchanged. This function is only intended to handle default parameters whose node type is `Syntax.Literal` (string, numeric, and boolean literals). This is because more complex default values may include, for example, references to internal variables, which it may not make sense to include in documentation.
Source:
Returns:
A function that updates the function doclet to include the default values of parameters.
Type
function

makeGeneratorFinisher() → {function}

Create a function that will mark a doclet as a generator function.
Source:
Returns:
A function that marks a doclet as a generator function.
Type
function

makeInlineParamsFinisher(parser) → {function}

For function parameters that have inline documentation, create a function that will merge the inline documentation into the function's doclet. If the parameter is already documented in the function's doclet, the inline documentation will be ignored.
Parameters:
Name Type Description
parser module:jsdoc/src/parser.Parser The JSDoc parser.
Source:
Returns:
A function that merges a parameter's inline documentation into the function's doclet.
Type
function

makePrivatePropertyFinisher() → {function}

Create a function that will mark a doclet as private.
Source:
Returns:
A function that marks a doclet as private.
Type
function

makeRestParamFinisher() → {function}

For functions that may include a rest parameter, create a function that will automatically update the rest parameter's documentation to indicate that the parameter is repeatable. If the parameter is not documented, the function's doclet will remain unchanged.
Source:
Returns:
A function that updates the rest parameter's documentation to indicate that the parameter is repeatable.
Type
function

makeSymbolFoundEvent()

Source:

makeVarsFinisher()

Source:

removeCommentDelimiters()

Source:

trackVars()

Source:

updateCommentNode()

Source: