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

Method expression

ark/schema/structure/optional.ts:122–128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

120 }
121
122 get expression(): string {
123 return (this.c.expression ??= composing(() =>
124 this.hasDef() ?
125 `${this.keyStr}: ${elided(this.value.expression)} = ${printable(this.inner.default, { ownDataOnly: true })}`
126 : `${this.keyStr}?: ${elided(this.value.expression)}`
127 ))
128 }
129
130 /** the morph writing its default when its key is missing */
131 defMorph: Morph | undefined =

Callers

nothing calls this directly

Calls 3

composingFunction · 0.90
elidedFunction · 0.90
printableFunction · 0.90

Tested by

no test coverage detected