(node: ts.Node)
| 348 | const MAX_NODE_DEBUG_LENGTH = 50; |
| 349 | |
| 350 | export function getNodeDebugDescription(node: ts.Node): string { |
| 351 | const sourceFile = node.getSourceFile(); |
| 352 | const position = sourceFile.getLineAndCharacterOfPosition(node.getStart()); |
| 353 | |
| 354 | let text = node.getText(); |
| 355 | if (text.length > MAX_NODE_DEBUG_LENGTH) { |
| 356 | text = text.substr(0, MAX_NODE_DEBUG_LENGTH); |
| 357 | } |
| 358 | |
| 359 | return `(node kind ${getSyntaxKindString(node.kind)}, content '${text}') at ${sourceFile.fileName}:${ |
| 360 | position.line + 1 |
| 361 | }:${position.character + 1}`; |
| 362 | } |
| 363 | |
| 364 | export function resolveTypeOfExpression(expression: ts.Expression, typeChecker: ts.TypeChecker): ResolvedType { |
| 365 | let effectiveType: SymbolType | undefined; |
no test coverage detected