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

Method refToId

ark/schema/units.ts:211–218  ·  view source on GitHub ↗
(id: NodeId, opts?: ReferenceOptions)

Source from the content-addressed store, hash-verified

209 }
210
211 override refToId(id: NodeId, opts?: ReferenceOptions): string {
212 const reference = this.link.byId[id]
213 const kind = opts?.kind ?? this.trav
214 if (reference && !kindsByNode.get(reference)?.includes(kind))
215 this.link.dependencies[`${this.nameOf(id)}${kind}`] = [reference, kind]
216
217 return super.refToId(id, opts)
218 }
219
220 override ref(value: object | symbol): string {
221 if (!isNode(value) || !value.isRoot() || !value.tfs)

Callers

nothing calls this directly

Calls 3

getMethod · 0.65
refToIdMethod · 0.65
nameOfMethod · 0.45

Tested by

no test coverage detected