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

Method ref

ark/schema/units.ts:220–227  ·  view source on GitHub ↗
(value: object | symbol)

Source from the content-addressed store, hash-verified

218 }
219
220 override ref(value: object | symbol): string {
221 if (!isNode(value) || !value.isRoot() || !value.tfs)
222 return super.ref(value)
223 include(value)
224 let shape = shapes.get(value)
225 if (!shape) shapes.set(value, (shape = Object.create(value) as object))
226 return super.ref(shape)
227 }
228 }
229 const link = createLinkage(undefined, { compiler: InPlaceCompiler })
230 include(root)

Callers 15

createAsyncPrecompilerFunction · 0.45
ownFilesOfFunction · 0.45
refMethod · 0.45
compileMethod · 0.45
jsCondMethod · 0.45
compileMethod · 0.45
jsIndiscMethod · 0.45
jsAllowsInBranchFunction · 0.45
compileOwnEnumerablePathFunction · 0.45
invokeTransformFunction · 0.45
jsCondMethod · 0.45
compileMethod · 0.45

Calls 4

isNodeFunction · 0.90
includeFunction · 0.70
getMethod · 0.65
setMethod · 0.45

Tested by 1

ownFilesOfFunction · 0.36