Skip to main content

Function: getLeadingDocComment()

getLeadingDocComment(sourceCode: SourceCode, node: Node): Comment | null

Defined in: _internal/doc-comments.ts:235

Get the closest leading documentation block comment attached to a node. A comment is considered attached when it ends on the previous line.

Parametersโ€‹

sourceCodeโ€‹

SourceCode

nodeโ€‹

Node

Returnsโ€‹

Comment | null