(node: ts.Node)
| 355 | } |
| 356 | let found: ts.SignatureDeclaration | undefined |
| 357 | const visit = (node: ts.Node) => { |
| 358 | if (found) { |
| 359 | return |
| 360 | } |
| 361 | if ( |
| 362 | ts.isFunctionLike(node) && |
| 363 | 'parameters' in node && |
| 364 | source.getLineAndCharacterOfPosition(node.getStart()).line === |
| 365 | Number(line) - 1 |
| 366 | ) { |
| 367 | found = node |
| 368 | return |
| 369 | } |
| 370 | ts.forEachChild(node, visit) |
| 371 | } |
| 372 | visit(source) |
| 373 | return found && { parameter: found.parameters[0]?.type, returns: found.type } |
| 374 | } |
no outgoing calls
no test coverage detected