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

Function publicDeclarationRange

packages/tools/jsdocs/src/Jsdocs.ts:2840–2848  ·  view source on GitHub ↗
(node: ts.Node, name: string)

Source from the content-addressed store, hash-verified

2838}
2839
2840function publicDeclarationRange(node: ts.Node, name: string): readonly [number, number] {
2841 if (ts.isVariableStatement(node)) {
2842 const declaration = node.declarationList.declarations.find((item) =>
2843 ts.isIdentifier(item.name) && item.name.text === name
2844 )
2845 if (declaration !== undefined) return nodeRange(declaration)
2846 }
2847 return nodeRange(node)
2848}
2849
2850function bucketOfTs(node: ts.Node): ExportBucket | undefined {
2851 if (ts.isVariableStatement(node) || ts.isFunctionDeclaration(node) || ts.isClassDeclaration(node)) return "value"

Callers 2

parseNamespaceTsFunction · 0.85
parseSourceFileDocsFunction · 0.85

Calls 2

nodeRangeFunction · 0.85
findMethod · 0.65

Tested by

no test coverage detected