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

Function resolve

ark/type/type.ts:395–401  ·  view source on GitHub ↗
(k: string)

Source from the content-addressed store, hash-verified

393const bindKeywords = (keywords: Dict, $: InternalScope): object => {
394 const bound = hasArkKind(keywords, "module") ? new RootModule({}) : {}
395 const resolve = (k: string) => {
396 const keyword = keywords[k]
397 if (hasArkKind(keyword, "module")) return bindKeywords(keyword, $)
398 const resolution = $.bindKw(keyword as BaseRoot | GenericRoot)
399 // a resolved scope has already compiled the nodes bound before it
400 return $.resolved ? finalizeExport($, resolution) : resolution
401 }
402 for (const k of Object.keys(keywords)) defineLazily(bound, k, resolve)
403 return bound
404}

Callers 14

locateProjectRootFunction · 0.70
detectPackageManagerFunction · 0.70
findAotInNodeModulesFunction · 0.70
findAotViaRequireFunction · 0.70
explicitCwdOfFunction · 0.70
runInitFunction · 0.70
resolveTargetFunction · 0.70
runMigrateFunction · 0.70
runSkillFunction · 0.70

Calls 3

hasArkKindFunction · 0.90
finalizeExportFunction · 0.90
bindKeywordsFunction · 0.85

Tested by 2

runFunction · 0.40
runFunction · 0.40