MCPcopy
hub / github.com/arktypeio/arktype / bootstrapAliasReferences

Function bootstrapAliasReferences

ark/schema/scope.ts:755–765  ·  view source on GitHub ↗
(resolution: BaseRoot | GenericRoot)

Source from the content-addressed store, hash-verified

753}
754
755const bootstrapAliasReferences = (resolution: BaseRoot | GenericRoot) => {
756 const aliases = resolution.references.filter(node => node.hasKind("alias"))
757 for (const aliasNode of aliases) {
758 Object.assign(aliasNode.referencesById, aliasNode.resolution.referencesById)
759 for (const ref of resolution.references) {
760 if (aliasNode.id in ref.referencesById)
761 Object.assign(ref.referencesById, aliasNode.referencesById)
762 }
763 }
764 return resolution
765}
766
767const resolutionsToJson = (resolutions: InternalResolutions): JsonStructure =>
768 flatMorph(resolutions, (k, v) => [

Callers 2

exportFunction · 0.85
finalizeFunction · 0.85

Calls 1

filterMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…