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

Function tAllows

ark/schema/structure/prop.ts:115–125  ·  view source on GitHub ↗
(data: object, ctx: InternalTraversal | AliasDepth)

Source from the content-addressed store, hash-verified

113 }
114
115 tAllows(data: object, ctx: InternalTraversal | AliasDepth): boolean {
116 if (this.key in data) {
117 // ctx will be undefined if this node isn't context-dependent
118 return travKey(
119 this.key,
120 () => this.value.tAllows((data as any)[this.key], ctx),
121 ctx
122 )
123 }
124 return this.optional
125 }
126
127 tApply(data: object, ctx: InternalTraversal): void {
128 if (this.key in data) {

Callers

nothing calls this directly

Calls 2

travKeyFunction · 0.90
tAllowsMethod · 0.45

Tested by

no test coverage detected