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

Function ref

ark/schema/shared/compile.ts:393–398  ·  view source on GitHub ↗
(value: object | symbol)

Source from the content-addressed store, hash-verified

391 }
392
393 ref(value: object | symbol): string {
394 if (!this.refs) return registeredReference(value)
395 let name = this.refs.get(value)
396 if (name === undefined) this.refs.set(value, (name = `r${this.refs.size}`))
397 return name
398 }
399
400 site(node: BaseNode): string {
401 return this.ref(node.failSite)

Callers 3

rootApplyPartsFunction · 0.70
fallbackFunction · 0.70
returnResultFunction · 0.70

Calls 3

registeredReferenceFunction · 0.90
getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected