MCPcopy
hub / github.com/prisma/prisma / withIndent

Method withIndent

packages/ts-builders/src/Writer.ts:102–107  ·  view source on GitHub ↗

* Increases indentation level by 1, calls provided callback and then decreases indentation again. * Could be used for writing indented blocks of text: * * @example * ```ts * writer * .writeLine('{') * .withIndent(() => { * writer.writeLine('foo: 123'); * writ

(callback: (writer: this) => void)

Source from the content-addressed store, hash-verified

100 * @returns
101 */
102 withIndent(callback: (writer: this) => void): this {
103 this.indent()
104 callback(this)
105 this.unindent()
106 return this
107 }
108
109 /**
110 * Calls provided callback next time when new line is started.

Callers 8

writeWithContentsMethod · 0.80
writeWithItemsMethod · 0.80
writeMethod · 0.80
Writer.test.tsFile · 0.80
writeMultilineMethod · 0.80
writeMethod · 0.80
writeMethod · 0.80
writeMethod · 0.80

Calls 2

indentMethod · 0.95
unindentMethod · 0.95

Tested by

no test coverage detected