(c: ast.ClassDeclaration)
| 570 | ) |
| 571 | |
| 572 | const getClassDeclarationSignature = (c: ast.ClassDeclaration) => { |
| 573 | const name = c.getName() ?? "" |
| 574 | return pipe( |
| 575 | Effect.succeed(getTypeParameters(c.getTypeParameters())), |
| 576 | Effect.map((typeParameters) => |
| 577 | pipe( |
| 578 | c.getConstructors(), |
| 579 | Array.matchLeft({ |
| 580 | onEmpty: () => `declare class ${name}${typeParameters}`, |
| 581 | onNonEmpty: (head) => |
| 582 | `declare class ${name}${typeParameters} { ${ |
| 583 | getConstructorDeclarationSignature( |
| 584 | head |
| 585 | ) |
| 586 | } }` |
| 587 | }) |
| 588 | ) |
| 589 | ) |
| 590 | ) |
| 591 | } |
| 592 | |
| 593 | const parseClass = (c: ast.ClassDeclaration) => |
| 594 | Effect.gen(function*() { |
no test coverage detected