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

Function trackedId

ark/schema/node.ts:600–615  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

598
599 // a root no alias references is tracked as an equal resolution
600 get trackedId(): string {
601 if (this.c.trackedId) return this.c.trackedId
602 if (!isResolutionFinal()) return this.id
603 if (this.is("alias") || isNode($ark.nodesById.get(this.id)))
604 return (this.c.trackedId = this.id)
605 const alias = referencesThroughAliases(this.references).find(
606 reference =>
607 reference.is("alias") &&
608 reference.resolution.kind === this.kind &&
609 _isMutuallySimulated(this, reference.resolution, {
610 unfoldsAliases: true,
611 subsumes: false
612 })
613 ) as AliasNode | undefined
614 return (this.c.trackedId = alias ? alias.resolution.id : this.id)
615 }
616
617 /**
618 * whether it alters data, counting what it reaches through aliases, which

Callers

nothing calls this directly

Calls 7

isResolutionFinalFunction · 0.90
isNodeFunction · 0.90
referencesThroughAliasesFunction · 0.85
_isMutuallySimulatedFunction · 0.85
isMethod · 0.80
findMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected