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

Method deletes

ark/schema/structure/structure.ts:1431–1443  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1429 }
1430 this.jsDefaults(js)
1431 const deletes = () =>
1432 this.jsForOwnKeys(
1433 js,
1434 "data",
1435 () =>
1436 js.if(
1437 `!(k in ${js.ref(this.byKey)}) && !(${this._jsDeclaresKey(js)})`,
1438 () => this.jsCopy(js).line("delete out[k]")
1439 ),
1440 "dataKeys",
1441 "dataSymbols",
1442 true
1443 )
1444 if (this.sequence) js.if("!indexed", deletes)
1445 else deletes()
1446 this.jsDeclaredCopy(js)

Callers

nothing calls this directly

Calls 6

jsForOwnKeysMethod · 0.95
_jsDeclaresKeyMethod · 0.95
jsCopyMethod · 0.95
ifMethod · 0.80
lineMethod · 0.80
refMethod · 0.45

Tested by

no test coverage detected