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

Function readValue

ark/type/standalone/combinators.ts:1076–1084  ·  view source on GitHub ↗
(js: CombinatorCompiler, node: BaseRoot)

Source from the content-addressed store, hash-verified

1074 : js.refToId(node.id, { kind: node.allowsCtx ? "Apply" : "Allows" })
1075
1076const readValue = (js: CombinatorCompiler, node: BaseRoot): string =>
1077 node.hasAlias ?
1078 writeCall(
1079 "aliasedValue",
1080 readChecker(js, node),
1081 js.ref(node),
1082 `${(node.entersAlias ? 1 : 0) | (node.tfs && node.tfsById ? 2 : 0)}`
1083 )
1084 : readChecker(js, node)
1085
1086// a case read as the branch it was pruned from where that holds an alias
1087const readCase = (

Callers 2

refFunction · 0.85
writeShapeFunction · 0.85

Calls 3

writeCallFunction · 0.85
readCheckerFunction · 0.85
refMethod · 0.45

Tested by

no test coverage detected