(sf: ts.SourceFile, name: string)
| 619 | } |
| 620 | |
| 621 | export function getClass(sf: ts.SourceFile, name: string): ClassDeclaration<ts.ClassDeclaration> { |
| 622 | for (const stmt of sf.statements) { |
| 623 | if (isNamedClassDeclaration(stmt) && stmt.name.text === name) { |
| 624 | return stmt; |
| 625 | } |
| 626 | } |
| 627 | throw new Error(`Class ${name} not found in file: ${sf.fileName}: ${sf.text}`); |
| 628 | } |
| 629 | |
| 630 | export function getFunction( |
| 631 | sf: ts.SourceFile, |
no test coverage detected