MCPcopy Create free account
hub / github.com/arktypeio/arktype / block

Method block

ark/schema/shared/compile.ts:181–187  ·  view source on GitHub ↗
(prefix: string, contents: (self: this) => this, suffix = "")

Source from the content-addressed store, hash-verified

179 }
180
181 block(prefix: string, contents: (self: this) => this, suffix = ""): this {
182 this.line(`${prefix} {`)
183 this.indent()
184 contents(this)
185 this.dedent()
186 return this.line(`}${suffix}`)
187 }
188
189 return(expression: CoercibleValue = ""): this {
190 return this.line(`return ${expression}`)

Callers 8

ifMethod · 0.95
elseIfMethod · 0.95
elseMethod · 0.95
loopMethod · 0.95
jsAllowsMethod · 0.80
compileDeclaredKeySwitchFunction · 0.80
switchFunction · 0.80
rejectNullishFunction · 0.80

Calls 3

lineMethod · 0.95
indentMethod · 0.95
dedentMethod · 0.95

Tested by

no test coverage detected