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

Method holdsValue

ark/schema/structure/optional.ts:141–145  ·  view source on GitHub ↗
(data: object)

Source from the content-addressed store, hash-verified

139
140 // an undefined its default replaces is no value
141 override holdsValue(data: object): boolean {
142 return this.defaultsUndefined ?
143 (data as Record<PropertyKey, unknown>)[this.key] !== undefined
144 : this.key in data
145 }
146
147 override jsHoldsValue(js: NodeCompiler, data: string): string {
148 return this.defaultsUndefined ?

Callers 3

tTransformMethod · 0.80
applySharedKeysMethod · 0.80
applyStructMorphMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected