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

Function withRecursion

packages/effect/src/Schema.ts:10996–11008  ·  view source on GitHub ↗
(
  fc: typeof FastCheck,
  ctx: Annotations.ToArbitrary.Context,
  terminal: FastCheck.Arbitrary<T> | undefined,
  arbitrary: FastCheck.Arbitrary<T>
)

Source from the content-addressed store, hash-verified

10994}
10995
10996function withRecursion<T>(
10997 fc: typeof FastCheck,
10998 ctx: Annotations.ToArbitrary.Context,
10999 terminal: FastCheck.Arbitrary<T> | undefined,
11000 arbitrary: FastCheck.Arbitrary<T>
11001) {
11002 return {
11003 arbitrary: terminal === undefined || ctx.recursion === undefined
11004 ? arbitrary
11005 : fc.oneof(ctx.recursion, terminal, arbitrary),
11006 terminal
11007 }
11008}
11009
11010function arrayFromItems<T>(
11011 fc: typeof FastCheck,

Callers 6

OptionFunction · 0.85
ResultFunction · 0.85
causeReasonToArbitraryFunction · 0.85
causeToArbitraryFunction · 0.85
ExitFunction · 0.85
collectionArbitraryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected