(declaration: string)
| 72 | } |
| 73 | |
| 74 | function getFirstClassDeclaration(declaration: string) { |
| 75 | const matches = declaration.match(/(?:export class )(\w+)(?:\s|\{|<)/); |
| 76 | if (matches === null || matches.length !== 2) { |
| 77 | throw new Error(`Did not find exactly one exported class in: ${declaration}`); |
| 78 | } |
| 79 | return matches[1].trim(); |
| 80 | } |
| 81 | |
| 82 | export function createModuleAndProjectWithDeclarations( |
| 83 | env: LanguageServiceTestEnv, |
no test coverage detected
searching dependent graphs…