MCPcopy Create free account
hub / github.com/Effect-TS/effect / getErrorExitCode

Function getErrorExitCode

packages/effect/src/Runtime.ts:311–319  ·  view source on GitHub ↗
(u: unknown)

Source from the content-addressed store, hash-verified

309 * @since 4.0.0
310 */
311export const getErrorExitCode = (u: unknown): number => {
312 if (typeof u === "object" && u !== null && errorExitCode in u) {
313 const code = u[errorExitCode]
314 if (typeof code === "number") {
315 return code
316 }
317 }
318 return 1
319}
320
321/**
322 * Type-level key for the `Runtime.errorReported` marker.

Callers 1

defaultTeardownFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected