(c: ast.ClassDeclaration)
| 591 | } |
| 592 | |
| 593 | const parseClass = (c: ast.ClassDeclaration) => |
| 594 | Effect.gen(function*() { |
| 595 | const doc = parseDoc(getJSDocText(c.getJsDocs())) |
| 596 | if (shouldIgnore(doc)) { |
| 597 | return [] |
| 598 | } |
| 599 | const name = c.getName() ?? "" |
| 600 | const signature = yield* getClassDeclarationSignature(c) |
| 601 | const methods = yield* pipe( |
| 602 | c.getInstanceMethods(), |
| 603 | Effect.forEach(parseMethod), |
| 604 | Effect.map(Array.getSomes) |
| 605 | ) |
| 606 | const staticMethods = yield* pipe( |
| 607 | c.getStaticMethods(), |
| 608 | Effect.forEach(parseMethod), |
| 609 | Effect.map(Array.getSomes) |
| 610 | ) |
| 611 | const properties = yield* parseProperties(c) |
| 612 | const position = yield* parsePosition(c) |
| 613 | return [ |
| 614 | new Domain.Class( |
| 615 | name, |
| 616 | doc, |
| 617 | signature, |
| 618 | position, |
| 619 | methods, |
| 620 | staticMethods, |
| 621 | properties |
| 622 | ) |
| 623 | ] |
| 624 | }) |
| 625 | |
| 626 | /** |
| 627 | * Parses exported classes and their documented members from the current source file. |
nothing calls this directly
no test coverage detected