MCPcopy Create free account
hub / github.com/Snapchat/Valdi / dumpFunction

Function dumpFunction

compiler/companion/src/AST.ts:765–775  ·  view source on GitHub ↗
(node: ts.FunctionDeclaration, references: AST.TypeReferences)

Source from the content-addressed store, hash-verified

763}
764
765export function dumpFunction(node: ts.FunctionDeclaration, references: AST.TypeReferences): AST.Function {
766 const functionType = parseFunctionType(node, references);
767
768 return {
769 start: node.getStart(),
770 end: node.getEnd(),
771 name: (node.name && getIdentifierString(node.name)) ?? '',
772 type: functionType,
773 leadingComments: getNodeComments(node),
774 };
775}
776
777export function dumpVariable(node: ts.VariableStatement, references: AST.TypeReferences): AST.Variable {
778 if (node.declarationList.declarations.length !== 1) {

Callers 2

getFunctionASTMethod · 0.90
dumpRootNodesFunction · 0.85

Calls 4

getNodeCommentsFunction · 0.90
parseFunctionTypeFunction · 0.85
getIdentifierStringFunction · 0.85
getEndMethod · 0.80

Tested by

no test coverage detected