Skip to main content

Type Alias: DepthContext

DepthContext = object

Defined in: packages/fast-check/src/arbitrary/_internals/helpers/DepthContext.ts:28

Instance of depth, can be used to alter the depth perceived by an arbitrary or to bias your own arbitraries based on the current depth

Remarks​

Since 2.25.0

Properties​

depth​

depth: number

Defined in: packages/fast-check/src/arbitrary/_internals/helpers/DepthContext.ts:38

Current depth (starts at 0, continues with 1, 2...). Only made of integer values superior or equal to 0.

Remark: Whenever altering the depth during a generate, please make sure to ALWAYS reset it to its original value before you leave the generate. Otherwise the execution will imply side-effects that will potentially impact the following runs and make replay of the issue barely impossible.