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

Function compileDeclaredKeySwitch

ark/schema/structure/structure.ts:1837–1845  ·  view source on GitHub ↗
(
	js: NodeCompiler,
	props: Prop.Node[]
)

Source from the content-addressed store, hash-verified

1835 : js.line(call)
1836
1837const compileDeclaredKeySwitch = (
1838 js: NodeCompiler,
1839 props: Prop.Node[]
1840): NodeCompiler =>
1841 js.block("switch (k)", () =>
1842 js.line(
1843 `${props.map(prop => `case ${js.serialize(prop.key)}:`).join(" ")} continue`
1844 )
1845 )
1846
1847const orderProps = (
1848 props: array<Prop.Node>,

Callers 1

jsEntryMethod · 0.85

Calls 3

blockMethod · 0.80
lineMethod · 0.80
mapMethod · 0.65

Tested by

no test coverage detected