Skip to main content

Function: getFunctionDocCommentTarget()

function getFunctionDocCommentTarget(node: Node): Readonly<{
docNode: TSESTree.Node;
reportNode: TSESTree.Node;
}>;

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

Resolve the declaration that owns documentation for a function-like node.

Function expressions used as variable initializers are documented on the variable declaration. Class methods and function-valued class properties are documented on the class member. All other function-like declarations and TypeScript signatures document themselves. Export wrappers are resolved last so comments placed before an exported declaration remain attached correctly.

Parametersโ€‹

nodeโ€‹

Node

Returnsโ€‹

Readonly<{ docNode: TSESTree.Node; reportNode: TSESTree.Node; }>