(node: ts.VariableStatement, references: AST.TypeReferences)
| 775 | } |
| 776 | |
| 777 | export function dumpVariable(node: ts.VariableStatement, references: AST.TypeReferences): AST.Variable { |
| 778 | if (node.declarationList.declarations.length !== 1) { |
| 779 | throw new Error('Only declaration of single variables are currently supported'); |
| 780 | } |
| 781 | |
| 782 | const declaration = node.declarationList.declarations[0]; |
| 783 | return { |
| 784 | start: node.getStart(), |
| 785 | end: node.getEnd(), |
| 786 | name: getIdentifierString(declaration.name), |
| 787 | type: parseType(declaration.type, references), |
| 788 | leadingComments: getNodeComments(node), |
| 789 | }; |
| 790 | } |
| 791 | |
| 792 | export function dumpEnum(node: ts.EnumDeclaration): AST.Enum { |
| 793 | const members: AST.EnumMember[] = []; |
no test coverage detected