MCPcopy
hub / github.com/Effect-TS/effect / optionEncoded

Function optionEncoded

packages/effect/src/Schema.ts:7128–7134  ·  view source on GitHub ↗
(value: Value)

Source from the content-addressed store, hash-verified

7126 }).annotations({ description: `SomeEncoded<${format(value)}>` })
7127
7128const optionEncoded = <Value extends Schema.Any>(value: Value) =>
7129 Union(
7130 OptionNoneEncoded,
7131 optionSomeEncoded(value)
7132 ).annotations({
7133 description: `OptionEncoded<${format(value)}>`
7134 })
7135
7136const optionDecode = <A>(input: OptionEncoded<A>): option_.Option<A> =>
7137 input._tag === "None" ? option_.none() : option_.some(input.value)

Callers 1

OptionFunction · 0.85

Calls 4

optionSomeEncodedFunction · 0.85
UnionFunction · 0.70
formatFunction · 0.70
annotationsMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…