MCPcopy Create free account
hub / github.com/Effect-TS/effect / getNodeJSDoc

Function getNodeJSDoc

packages/tools/jsdocs/src/Jsdocs.ts:2651–2657  ·  view source on GitHub ↗
(node: ts.Node)

Source from the content-addressed store, hash-verified

2649}
2650
2651function getNodeJSDoc(node: ts.Node): JSDocBlock | undefined {
2652 const jsDocs = (node as { readonly jsDoc?: ReadonlyArray<ts.JSDoc> }).jsDoc
2653 const jsDoc = jsDocs?.[jsDocs.length - 1]
2654 if (jsDoc === undefined) return undefined
2655 const source = node.getSourceFile().text
2656 return parseJSDocBlock(source.slice(jsDoc.pos, jsDoc.end), [jsDoc.pos, jsDoc.end])
2657}
2658
2659function addModelDiagnostics(
2660 out: Array<JSDocModelDiagnostic>,

Callers 2

symbolHasPublicJSDocFunction · 0.85
parseDocumentedTsFunction · 0.85

Calls 1

parseJSDocBlockFunction · 0.85

Tested by

no test coverage detected