MCPcopy Create free account
hub / github.com/effect-app/libs / OptionFromOptionalKey

Function OptionFromOptionalKey

repos/effect/packages/effect/src/Schema.ts:8662–8667  ·  view source on GitHub ↗
(schema: S)

Source from the content-addressed store, hash-verified

8660 return cached
8661 }
8662 const normalizedOptions = getErrorOptions(key)
8663 const schema = instanceOf(globalThis.Error, {
8664 representation: {
8665 id: "effect/schema/Error",
8666 payload: normalizedOptions ?? null
8667 },
8668 toCode: () => ({
8669 runtime: normalizedOptions !== undefined
8670 ? `Schema.ErrorInstance(${format(normalizedOptions)})`

Callers

nothing calls this directly

Calls 5

toTypeInterface · 0.85
optionalKeyInterface · 0.70
decodeToFunction · 0.70
OptionFunction · 0.70
pipeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…