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

Function createLinkage

ark/schema/units.ts:606–621  ·  view source on GitHub ↗
(
	nameOf?: (id: NodeId) => string,
	opts: UnitOptions = {},
	unit?: string
)

Source from the content-addressed store, hash-verified

604const noneReused: ReadonlySet<BaseNode> = new Set()
605
606const createLinkage = (
607 nameOf?: (id: NodeId) => string,
608 opts: UnitOptions = {},
609 unit?: string
610): UnitLinkage => ({
611 byId: {},
612 reused: noneReused,
613 unreached: new Set(),
614 reached: [],
615 dependencies: {},
616 refs: new Map(),
617 members: [],
618 nameOf,
619 opts,
620 unit
621})
622
623export class TraversalCompiler extends NodeCompiler {
624 /** how the units it writes reference one another */

Callers 4

precompileFunction · 0.85
precompileInPlaceFunction · 0.85
writeComponentFunction · 0.85
compileContentFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected