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

Function declarationSignature

packages/tools/jsdocs/src/Jsdocs.ts:2997–3019  ·  view source on GitHub ↗
(
  name: string,
  bucket: ExportBucket,
  node: ts.Node,
  checker: ts.TypeChecker,
  cwd: string
)

Source from the content-addressed store, hash-verified

2995}
2996
2997function declarationSignature(
2998 name: string,
2999 bucket: ExportBucket,
3000 node: ts.Node,
3001 checker: ts.TypeChecker,
3002 cwd: string
3003): string | null {
3004 if (ts.isVariableStatement(node)) {
3005 const declaration = node.declarationList.declarations.find((item) =>
3006 ts.isIdentifier(item.name) && item.name.text === name
3007 )
3008 if (declaration === undefined) return null
3009 const symbol = checker.getSymbolAtLocation(declaration.name)
3010 return symbol === undefined ? null : symbolSignature(name, bucket, symbol, declaration.name, checker, cwd)
3011 }
3012 const nameNode = ts.isFunctionDeclaration(node) || ts.isClassDeclaration(node) || ts.isInterfaceDeclaration(node) ||
3013 ts.isTypeAliasDeclaration(node)
3014 ? node.name
3015 : undefined
3016 if (nameNode === undefined) return null
3017 const symbol = checker.getSymbolAtLocation(nameNode)
3018 return symbol === undefined ? null : symbolSignature(name, bucket, symbol, nameNode, checker, cwd)
3019}
3020
3021function exportSpecifierSignature(
3022 name: string,

Callers 1

parseSourceFileDocsFunction · 0.85

Calls 2

symbolSignatureFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected