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

Function runtimeVariant

ark/repo/testBuild.ts:324–332  ·  view source on GitHub ↗
(variant: string)

Source from the content-addressed store, hash-verified

322// what errors "none" and builds writing errors for size load in place of
323// arktype/schema/runtime
324const runtimeVariant = async (variant: string) => {
325 const runtime = await importBuilt(`arktype/schema/runtime/${variant}`)
326 if (Object.keys(runtime).join() !== runtimeNames) {
327 throw new Error(
328 `⚠️ arktype/schema/runtime/${variant} exports other names than arktype/schema/runtime.`
329 )
330 }
331 return (runtime.ArkErrors as Function).prototype
332}
333
334if ("_at" in (await runtimeVariant("none")))
335 throw new Error("⚠️ arktype/schema/runtime/none bundles shared/issues.ts.")

Callers 1

testBuild.tsFile · 0.85

Calls 1

importBuiltFunction · 0.85

Tested by

no test coverage detected