MCPcopy Index your code
hub / github.com/Effect-TS/effect / optionArbitrary

Function optionArbitrary

packages/effect/src/Schema.ts:7140–7145  ·  view source on GitHub ↗
(value: LazyArbitrary<A>, ctx: ArbitraryGenerationContext)

Source from the content-addressed store, hash-verified

7138
7139const optionArbitrary =
7140 <A>(value: LazyArbitrary<A>, ctx: ArbitraryGenerationContext): LazyArbitrary<option_.Option<A>> => (fc) =>
7141 fc.oneof(
7142 ctx,
7143 fc.record({ _tag: fc.constant("None" as const) }),
7144 fc.record({ _tag: fc.constant("Some" as const), value: value(fc) })
7145 ).map(optionDecode)
7146
7147const optionPretty = <A>(value: pretty_.Pretty<A>): pretty_.Pretty<option_.Option<A>> =>
7148 option_.match({

Callers

nothing calls this directly

Calls 2

valueFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…