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

Function readCase

ark/type/standalone/combinators.ts:1087–1098  ·  view source on GitHub ↗
(
	js: CombinatorCompiler,
	node: BaseRoot,
	member: BaseRoot | undefined
)

Source from the content-addressed store, hash-verified

1085
1086// a case read as the branch it was pruned from where that holds an alias
1087const readCase = (
1088 js: CombinatorCompiler,
1089 node: BaseRoot,
1090 member: BaseRoot | undefined
1091): string =>
1092 member?.hasAlias ?
1093 writeCall(
1094 "aliasedMember",
1095 readChecker(js, node),
1096 JSON.stringify(js.nameOf(member.id))
1097 )
1098 : readChecker(js, node)
1099
1100// a root a checker reads in place of what its node holds, like one without
1101// the message configured for it, is no node of the root being written, nor

Callers 1

refFunction · 0.85

Calls 3

writeCallFunction · 0.85
readCheckerFunction · 0.85
nameOfMethod · 0.45

Tested by

no test coverage detected