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

Method line

src/source-code.ts:59–63  ·  view source on GitHub ↗

* Emit a line of code. * @param code The contents, if not specified, just adds a newline

(code?: string)

Source from the content-addressed store, hash-verified

57 * @param code The contents, if not specified, just adds a newline
58 */
59 public line(code?: string) {
60 const spaces: number = this.indent * this.indentLevel;
61 const prefix = " ".repeat(spaces);
62 this.file.addLine((prefix + (code ?? "")).trimEnd());
63 }
64
65 /**
66 * Opens a code block and increases the indentation level.

Callers 6

openMethod · 0.95
closeMethod · 0.95
constructorMethod · 0.95
constructorMethod · 0.95
constructorMethod · 0.80

Calls 1

addLineMethod · 0.80

Tested by

no test coverage detected