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

Function resolveContext

ark/schema/scope.ts:651–661  ·  view source on GitHub ↗
(
		name: string,
		ctx: BaseParseContext,
		node: BaseRoot
	)

Source from the content-addressed store, hash-verified

649 }
650
651 private resolveContext(
652 name: string,
653 ctx: BaseParseContext,
654 node: BaseRoot
655 ): BaseRoot {
656 if (ctx.isReferencedById) {
657 if (nodesById.get(node.id) !== node) node = withId(node, ctx.id)
658 publishNode(ctx, node)
659 } else nodesById.delete(ctx.id)
660 return (this.res[name] = node)
661 }
662
663 private resolvePending(name: string, pending: BaseRoot): BaseRoot {
664 if (inProgress.definitions && !isResolvable(pending)) {

Callers

nothing calls this directly

Calls 4

withIdFunction · 0.90
publishNodeFunction · 0.85
getMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected