MCPcopy Index your code
hub / github.com/projen/projen / close

Method close

src/source-code.ts:83–92  ·  view source on GitHub ↗

* Decreases the indentation level and closes a code block. * * @param code The code after the block is closed (e.g. `}`).

(code?: string)

Source from the content-addressed store, hash-verified

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}

Callers 5

constructorMethod · 0.95
constructorMethod · 0.95
watchLoopFunction · 0.80
constructorMethod · 0.80

Calls 1

lineMethod · 0.95

Tested by

no test coverage detected