MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / formatFunctionSignature

Function formatFunctionSignature

src/extraction/languages/nix.ts:114–121  ·  view source on GitHub ↗
(params: string[])

Source from the content-addressed store, hash-verified

112}
113
114function formatFunctionSignature(params: string[]): string {
115 if (params.length === 0) return '()';
116 if (params.length > 1) return params.join(' : ');
117
118 const [param] = params;
119 if (!param) return '()';
120 return param.startsWith('(') || param.includes('{') || param.includes('@') ? param : `(${param})`;
121}
122
123function inheritedAttrs(node: SyntaxNode): SyntaxNode | null {
124 return node.namedChildren.find((child) => child.type === 'inherited_attrs') ?? null;

Callers 1

nix.tsFile · 0.85

Calls 1

joinMethod · 0.45

Tested by

no test coverage detected