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

Function reasonOf

packages/ui/devtools/src/node/DevToolsVite.ts:276–279  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

274}
275
276const reasonOf = (error: unknown): string =>
277 Predicate.hasProperty(error, "cause") && error.cause instanceof Error
278 ? error.cause.message
279 : String(error)
280
281/**
282 * Starts the DevTools server when `vite dev` starts or restarts, stops it with

Callers 1

pluginFunction · 0.70

Calls 1

StringFunction · 0.50

Tested by

no test coverage detected