* Decreases the indentation level and closes a code block. * * @param code The code after the block is closed (e.g. `}`).
(code?: string)
| 81 | * @param code The code after the block is closed (e.g. `}`). |
| 82 | */ |
| 83 | public close(code?: string) { |
| 84 | if (this.indentLevel === 0) { |
| 85 | throw new Error("Cannot decrease indent level below zero"); |
| 86 | } |
| 87 | this.indentLevel--; |
| 88 | |
| 89 | if (code) { |
| 90 | this.line(code); |
| 91 | } |
| 92 | } |
| 93 | } |
no test coverage detected