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

Method jsHoldsValue

ark/schema/structure/optional.ts:147–151  ·  view source on GitHub ↗
(js: NodeCompiler, data: string)

Source from the content-addressed store, hash-verified

145 }
146
147 override jsHoldsValue(js: NodeCompiler, data: string): string {
148 return this.defaultsUndefined ?
149 `${data}${js.prop(this.key)} !== undefined`
150 : super.jsHoldsValue(js, data)
151 }
152}
153
154export const Optional = {

Callers 3

jsTfMethod · 0.80
jsDefaultsMethod · 0.80
jsDeleteTransformMethod · 0.80

Calls 1

propMethod · 0.80

Tested by

no test coverage detected