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

Method jsShapeCheck

ark/schema/structure/structure.ts:1325–1329  ·  view source on GitHub ↗

writes the check of data's shape, reading a required key first; copyOf handles data without it

(js: NodeCompiler)

Source from the content-addressed store, hash-verified

1323
1324 /** writes the check of data's shape, reading a required key first; copyOf handles data without it */
1325 jsShapeCheck(js: NodeCompiler): string {
1326 return this.required ?
1327 `${js.serialize(this.required[0].key)} in data && `
1328 : ""
1329 }
1330
1331 /** writes the copy of data's declared keys, those in `written` aside */
1332 jsDeclaredCopy(js: NodeCompiler, written?: Key[]): NodeCompiler {

Callers 2

jsCopyOnceMethod · 0.95
copyMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected