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

Function failSettings

ark/aot/cli.ts:107–114  ·  view source on GitHub ↗
(e: unknown)

Source from the content-addressed store, hash-verified

105
106// file errors (e.g. an unparseable package.json or ark.json) aren't usage errors
107const failSettings = (e: unknown): never => {
108 if (isFileError(e) || (e instanceof Error && "code" in e)) {
109 if (isCheckJson) emitJsonFailure(e.message, 1)
110 console.error(e.message)
111 process.exit(1)
112 }
113 return fail((e as Error).message)
114}
115
116const { values, positionals } = ((): {
117 values: Record<string, string | boolean | undefined>

Callers 2

declareFunction · 0.85
cli.tsFile · 0.85

Calls 4

isFileErrorFunction · 0.90
emitJsonFailureFunction · 0.85
failFunction · 0.70
errorMethod · 0.45

Tested by

no test coverage detected