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

Method write

ark/schema/shared/compile.ts:193–202  ·  view source on GitHub ↗
(name = "anonymous", indent: number = 0)

Source from the content-addressed store, hash-verified

191 }
192
193 write(name = "anonymous", indent: number = 0): string {
194 return `${name}(${this.argNames.join(", ")}) { ${
195 indent ?
196 this.body
197 .split("\n")
198 .map(l => " ".repeat(indent) + `${l}`)
199 .join("\n")
200 : this.body
201 } }`
202 }
203
204 compile(): compiledSignature {
205 return new DynamicFunction(...this.argNames, this.body) as never

Callers 5

declareTraversalFunction · 0.45
writePrecompiledUnitFunction · 0.45
rootApplyPartsFunction · 0.45
writeErrorFunction · 0.45
writeAtPathsFunction · 0.45

Calls 1

mapMethod · 0.65

Tested by

no test coverage detected