Function
TSModuleDeclaration
(
this: Printer,
node: t.TSModuleDeclaration,
)
Source from the content-addressed store, hash-verified
| 639 | } |
| 640 | |
| 641 | export function TSModuleDeclaration( |
| 642 | this: Printer, |
| 643 | node: t.TSModuleDeclaration, |
| 644 | ) { |
| 645 | const { declare, kind } = node; |
| 646 | |
| 647 | if (declare) { |
| 648 | this.word("declare"); |
| 649 | this.space(); |
| 650 | } |
| 651 | |
| 652 | if (kind !== "global") { |
| 653 | this.word(kind); |
| 654 | this.space(); |
| 655 | } |
| 656 | |
| 657 | this.print(node.id); |
| 658 | if (!node.body) { |
| 659 | this.semicolon(); |
| 660 | return; |
| 661 | } |
| 662 | this.space(); |
| 663 | this.print(node.body); |
| 664 | } |
| 665 | |
| 666 | export function TSModuleBlock(this: Printer, node: t.TSModuleBlock) { |
| 667 | printBraced(this, node, () => this.printSequence(node.body, true, true)); |
Callers
nothing calls this directly
Tested by
no test coverage detected