(node: ts.FunctionDeclaration, references: AST.TypeReferences)
| 763 | } |
| 764 | |
| 765 | export 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 | |
| 777 | export function dumpVariable(node: ts.VariableStatement, references: AST.TypeReferences): AST.Variable { |
| 778 | if (node.declarationList.declarations.length !== 1) { |
no test coverage detected