MCPcopy
hub / github.com/aws/jsii / line

Method line

packages/codemaker/src/codemaker.ts:104–115  ·  view source on GitHub ↗

* Emits a line into the currently opened file. * Line is emitted with the current level of indentation. * If no arguments are provided, an empty new line is emitted. * @param fmt String format arguments (passed to `util.format`) * @param args String arguments

(fmt?: string, ...args: string[])

Source from the content-addressed store, hash-verified

102 * @param args String arguments
103 */
104 public line(fmt?: string, ...args: string[]) {
105 if (!this.currentFile) {
106 throw new Error('Cannot emit source lines without opening a file');
107 }
108
109 if (fmt) {
110 fmt = this.makeIndent() + fmt;
111 this.currentFile.write(util.format(fmt, ...args));
112 }
113
114 this.currentFile.write('\n');
115 }
116
117 /**
118 * Same as `open`.

Callers 15

openMethod · 0.95
closeMethod · 0.95
onBeginClassMethod · 0.80
onInitializerMethod · 0.80
onBeginEnumMethod · 0.80
onEnumMemberMethod · 0.80
onBeginInterfaceMethod · 0.80
onInterfaceMethodMethod · 0.80
onInterfacePropertyMethod · 0.80
emitMavenPomMethod · 0.80

Calls 2

makeIndentMethod · 0.95
writeMethod · 0.65

Tested by

no test coverage detected