# fast-check Documentation
> Complete documentation for fast-check - Property-based testing framework for JavaScript/TypeScript
This file contains all documentation content in a single document following the llmstxt.org standard.
## Fake data
Replace random fake data by fake data backed by property based
### From tests with random to properties
Before diving into how to integrate your favorite fake data libraries with fast-check, let's explore one of the main reasons why users may prefer using these libraries in an uncontrolled way within their tests, rather than relying on property-based testing techniques for generating random inputs in a deterministic and reproducible manner.
Moving from simple random tests to property-based testing can greatly improve the effectiveness of your testing. While random tests are easy to write, they are not always reproducible and do not allow for shrinking in case of failure.
The following snippet is an example of such tests:
```js
test('sort users by ascending age', () => {
const userA = {
firstName: firstName(),
lastName: lastName(),
birthDate: birthDate(),
};
const userB = {
firstName: firstName(),
lastName: lastName(),
birthDate: birthDate({ strictlyOlderThan: userA.birthDate }),
};
expect(sortByAge([userA, userB])).toEqual([userA, userB]);
expect(sortByAge([userB, userA])).toEqual([userA, userB]);
});
```
Although the previous test successfully generates random users and checks that ordering is applied correctly, it falls short when it comes to providing details about the nature of any failures that may occur. In contrast, property-based testing, while requiring more initial effort, provides more reliable tests that can report failures and simplify the debugging process. To demonstrate this, we can rewrite the previous test using a property-based approach as shown below:
```js
test('sort users by ascending age', () => {
fc.assert(
fc.property(
fc
.record({
firstName: firstNameArb(),
lastName: lastNameArb(),
birthDate: birthDateArb(),
})
.chain((userA) =>
fc.record({
userA: fc.constant(userA),
userB: fc.record({
firstName: firstNameArb(),
lastName: lastNameArb(),
birthDate: birthDateArb({ strictlyOlderThan: userA.birthDate }),
}),
}),
),
({ userA, userB }) => {
expect(sortByAge([userA, userB])).toEqual([userA, userB]);
expect(sortByAge([userB, userA])).toEqual([userA, userB]);
},
),
);
});
```
The previous test revealed a challenge in generating entries beforehand, which can be a significant obstacle to adopting property-based testing.
This challenge has been addressed with the introduction of `gen` in fast-check. It makes writing property-based tests as straightforward as writing regular tests. With `gen` the test can be written as follow:
```js
test('sort users by ascending age', () => {
fc.assert(
fc.property(fc.gen(), (g) => {
const userA = {
firstName: g(firstName),
lastName: g(lastName),
birthDate: g(birthDate),
};
const userB = {
firstName: g(firstName),
lastName: g(lastName),
birthDate: g(birthDate, { strictlyOlderThan: userA.birthDate }),
};
expect(sortByAge([userA, userB])).toEqual([userA, userB]);
expect(sortByAge([userB, userA])).toEqual([userA, userB]);
}),
);
});
```
### Native ones
Although fast-check is not primarily designed for generating fake data, it does come with a number of [built-in generators](/docs/core-blocks/arbitraries/combiners/any/) doing so. Each built-in generator is designed to produce any acceptable value for the requested data, taking into account any subtleties in the specification.
For example, while an IPv4 address may be commonly represented as something like `127.0.0.1`, the specification allows for other formats such as `0x4.034`, and fast-check's IPv4 generator is able to generate values accordingly.
However, fast-check does not currently provide generators for names, surnames, or other non-fully constrained values. It is up to the user to provide their own generators for such data types.
:::tip[Build your own arbitraries]
If you need to generate custom fake data, such as names and surnames, you can refer to fast-check's [combiners](/docs/core-blocks/arbitraries/combiners/any/), which are designed to allow users to create their own values according to their specific needs.
:::
### Fake data libraries
In order to integrate external fake data libraries with fast-check, the generators have to be wrapped as arbitraries.
:::warning[Minimal requirements]
The minimal requirement that needs to be fulfilled by the wrapped library is to provide a way to be seeded and reproducible. fast-check cannot offer replay capabilities if the underlying generators are not able to generate the same values from one run to another.
:::
:::warning[Limitations]
Please note that if not explictely defined, the arbitraries will not be able to shrink the generated values.
:::
Here are some examples of how external fake data libraries can be wrapped within fast-check.
#### Seed-based (eg.: @faker-js/faker)
With [@faker-js/faker](https://www.npmjs.com/package/@faker-js/faker):
```js
import fc from 'fast-check';
import { faker } from '@faker-js/faker';
const fakerToArb = (fakerGen) => {
return fc
.noShrink(
// shrink on a seed makes no sense
fc.noBias(
// same probability to generate each of the allowed integers
fc.integer(),
),
)
.map((seed) => {
faker.seed(seed); // seed the generator
return fakerGen(); // call it
});
};
const streetAddressArb = fakerToArb(faker.address.streetAddress);
const customArb = fakerToArb(() => faker.fake('{{name.lastName}}, {{name.firstName}} {{name.suffix}}'));
```
:::tip[Recommended integration for Faker]
Our recommended integration for Faker has changed since the release of the version 8.2.0 of Faker. We recommend you to have a look to [our article](/blog/2024/07/18/integrating-faker-with-fast-check/) on the subject.
:::
#### Random-based (eg.: lorem-ipsum)
With [lorem-ipsum](https://www.npmjs.com/package/lorem-ipsum):
```js
import fc from 'fast-check';
import { loremIpsum } from 'lorem-ipsum';
const loremArb = fc
.noShrink(
fc.infiniteStream(
// Arbitrary generating 32-bit floating point numbers
// between 0 (included) and 1 (excluded) (uniform distribution)
fc.noBias(fc.integer({ min: 0, max: (1 << 24) - 1 }).map((v) => v / (1 << 24))),
),
)
.map((s) => {
const rng = () => s.next().value; // prng like Math.random but controlled by fast-check
return loremIpsum({ random: rng });
});
```
---
## Fuzzing
Turn fast-check into a fuzzer
### From Property-Based to Fuzzing
Although fast-check is not specifically designed as a fuzzer, it has several features that make it well-suited for this purpose. One such feature is its ability to repeatedly run a predicate against randomized data, which is a fundamental requirement for fuzzing. Additionally, fast-check is capable of identifying and reporting errors, which is crucial in fuzzing scenarios.
Due to its sophisticated random generators, fast-check can be a valuable tool for detecting critical bugs in your code and can be leveraged in a fuzzing mode.
If you want to use fast-check as a fuzzer, here's how to get started.
### Basic setup
To use fast-check as a fuzzer, the primary requirement is to execute the predicate against a large number of runs. One straightforward method of achieving this is to customize the `numRuns` value passed to the runner.
For instance, if you intend to run the tests an infinite number of times, you can use the following code snippet:
```js
fc.configureGlobal({ numRuns: Number.POSITIVE_INFINITY });
```
:::warning[Multi-process]
Please note that if you intend to run multiple properties an infinite number of times, it may be necessary to run them via multiple processes. JavaScript being a single-threaded language, running multiple infinite loops in a single thread may result in only one property being executed.
Therefore, to avoid this limitation and ensure that all properties are executed as intended, you should consider running them in separate processes.
:::
### Advanced setup
While the setup above will continue to run until fast-check uncovers a bug, you may want to consider more advanced patterns if your goal is to continuously fuzz the code without stopping even in the event of an error.
The following code snippets offer an approach to run fast-check continuously without stopping on failure.
#### Never failing predicates
The code snippet presented below consists of a function designed to wrap any predicate into a function that will not fail but will report into a file when a failure is detected.
```js
import fc from 'fast-check';
import fs from 'fs';
import process from 'process';
let failureId = 0;
function reportFailure(inputs, error) {
const fileName = `failure-pid${process.pid}-${++failureId}.log`;
const fileContent = `Counterexample: ${fc.stringify(inputs)}\n\nError: ${error}`;
fs.writeFile(fileName, fileContent);
}
function neverFailingPredicate(predicate) {
return (...inputs) => {
try {
const out = predicate(...inputs);
if (out === false) {
reportFailure(inputs, undefined);
}
} catch (err) {
reportFailure(inputs, err);
}
};
}
```
The `neverFailingPredicate` function takes in a predicate and returns a new function that wraps it. This new function will catch any error thrown by the predicate and report it as a failure, without actually failing. Additionally, it will generate a log file containing the counterexample that caused the failure and the error message.
This function can be used to run fast-check indefinitely without stopping on errors.
#### Fuzzing usage
The above helpers can be utilized directly to define properties and execute them in a fuzzer fashion as shown below:
```js
import fc from 'fast-check';
fc.configureGlobal({ numRuns: 1_000_000 });
test('fuzz predicate against arbitraries', () => {
fc.assert(fc.property(...arbitraries, neverFailingPredicate(predicate)));
});
```
Here, the `assert` function is used to execute a property that is generated from a set of arbitraries. The `neverFailingPredicate` function is used to wrap the predicate of the property, which ensures that the property will never fail but will report any detected failures.
Finally, the `configureGlobal` function is used to set the number of runs for the property to `1_000_000`, enabling it to run longer than the default setup.
#### Replay usage
In contrast to normal runs, when using the `neverFailingPredicate` function, the inputs provided to the predicate will never be shrunk. However, if you want to shrink them or just replay the failure, you can do it on a case-by-case basis as demonstrated below:
```js
test('replay reported error and shrink it', () => {
fc.assert(fc.property(...arbitraries, predicate), {
numRuns: 1,
examples: [[/* reported error */]],
});
});
```
Here, the `examples` option is used to provide the input that resulted in the reported error. By setting `numRuns` to 1, we ensure that the property is only executed once with the provided example. In case of failure, fast-check will then attempt to shrink the input, leading to a simpler failing input if feasible.
---
## Advanced
The pages in this section assume you are already comfortable writing a property and running it with `fc.assert`. They show what happens when you want fast-check to do more than check a single invariant on a single call.
Each page solves a different class of problem that cannot be expressed cleanly as a one-shot property:
- **Model-based testing** — when the system under test has state and a bug only shows up after a specific sequence of operations. You describe the legal operations as commands and let fast-check search the space of sequences.
- **Race conditions** — when the bug is not in what your async code does but in which order its callbacks resolve. fast-check's scheduler lets you deterministically explore those interleavings.
- **Fuzzing** — when you want to keep hunting for counterexamples across runs or beyond the default budget, turning fast-check into a continuous fuzz loop rather than a CI gate.
- **Fake data** — when you need large volumes of realistic-looking values outside the property-test context, for seeding environments or staging datasets.
:::tip[Want a hands-on walkthrough on race conditions?]
[Race conditions](/docs/advanced/race-conditions/) is the reference. If you would rather learn by writing a failing test step by step, the [Detect race conditions tutorial](/docs/tutorials/detect-race-conditions/) covers the same ground interactively.
:::
```mdx-code-block
import DocCardList from '@theme/DocCardList';
```
---
## Model based testing
Turn fast-check into a crazy QA
### Overview
Model-based testing can also be referred to as [Monkey testing](https://en.wikipedia.org/wiki/Monkey_testing) to some extent. The basic concept is to put our system under stress by providing it with random inputs. With model-based testing, we compare our system to a highly simplified version of it: the model.
:::info[The model, an optional helper]
While the model part can assist you in writing your tests by storing intermediate states, past actions, or even mimicking the system, it is entirely optional. Model-based testing can be performed without it as well.
:::
In the context of fast-check, model-based testing involves defining a set of commands that can be seen as potential actions to be executed on your system. Each command consists of two elements: a check to verify if the action can be executed in the current context, and the action itself, which also performs assertions. Typically, we rely on the model to verify if the action is suitable and apply the action to both the system and the model.
:::warning[The model, a simplified version of the system]
Although the model can be a useful tool, it's important to use it carefully. Model's goal is to simplify the system, but there is a risk that it may mimic the system too closely, leading to errors. The model should not be a carbon copy of the system but a simplified representation of it. It's crucial to avoid testing the code by comparing it to itself.
:::
### Write model-based tests
#### Define the commands
In fast-check, the commands have to implement the interface [`ICommand`](/docs/api/interfaces/ICommand). They basically come with three important methods:
- `check(model)` — Ensure that the model is in the appropriate state to execute the action
- `run(model, real)` — Execute the action
- `toString()` — Serialize the command for error reports
:::tip[Example of commands]
If your system is a music player, here are some commands you may have: play, pause, next track, add track…
:::
#### Generate the commands
Then, to ingest your previously defined commands into fast-check as an arbitrary, you can use the [`commands`](/docs/api/functions/commands) arbitrary. This function takes an array of commands as input and compiles them to produce a scenario that can be applied to your system.
:::info[Isn't commands just an array builder?]
Yes and no!
- Yes, because `commands(myCommands)` could be mimicked by `array(oneof(...myCommands))`.
- No, as it better fits the needs of model based testing. The `commands` helper is like an enhanced version of the `array` designed to meet the requirements of model-based testing. Unlike the `array` arbitrary, it can efficiently shrink failing scenarios.
:::
#### Print the commands
To better report the state when a model fails, you may need to capture the state within the scope of the command when it executes. This is particularly useful when commands depend on variables passed via the constructor and possibly impact different parts of the system depending on its state and past commands.
For example, consider a command like "go to track…". It can be parameterized with either the "track name" or the "track position". If the command is fed with a "track name" parameter, there is a high risk that it may not match any existing track available in the system, unless it has been ensured beforehand. On the other hand, if the command is parameterized with "track position", it can work regardless of the set of tracks in the system, as long as there is at least one. In other words, the check will only verify that a track exists and the command is allowed to go to the track from the current state. The command will then go to the track whose name is `allTracks[this.trackPosition % allTracks.length]`. As a user, you would certainly prefer to see "go to track 'the super track'" instead of "go to track 1200".
To achieve this, you may need to modify your command as follows:
```js
class GoToTrackCommand {
constructor(trackPosition) {
this.trackPosition = trackPosition;
}
check(m) {
return m.allTracks.length !== 0;
}
run(m, r) {
this.trackName = m.allTracks[this.trackPosition % m.allTracks.length];
// execute 'go to track' on the system (r) and impact the model (m) if needed
}
toString() {
return `go to track '${this.trackName}'`;
}
}
```
#### Run the commands
Commands have to be executed from the predicate. fast-check provides three model-based runners to run your commands:
- [`modelRun`](/docs/api/functions/modelRun) — Apply to any synchronous system: the commands have to be synchronous
- [`asyncModelRun`](/docs/api/functions/asyncModelRun) — Can work with asynchronous commands
- [`scheduledModelRun`](/docs/api/functions/scheduledModelRun) — Can work with asynchronous commands in a scheduled way for a better detection of race conditions
#### Example
Let's take the case of a list class with `pop`, `push`, `size` methods.
```typescript
class List {
data: number[] = [];
push = (v: number) => this.data.push(v);
pop = () => this.data.pop()!;
size = () => this.data.length;
}
```
Model based testing requires a model. A model is a simplified version of the real system. In this precise case our model would contain only a single integer representing the size of the list.
```typescript
type Model = { num: number };
```
Then we have to define a command for each of the available operations on our list. Commands come with two methods:
- `check(m: Readonly): boolean`: true if the command can be executed given the current state
- `run(m: Model, r: RealSystem): void`: execute the command on the system and update the model accordingly. Check for potential problems or inconsistencies between the model and the real system - throws in such case.
```typescript
class PushCommand implements fc.Command {
constructor(readonly value: number) {}
check = (m: Readonly) => true;
run(m: Model, r: List): void {
r.push(this.value); // impact the system
++m.num; // impact the model
}
toString = () => `push(${this.value})`;
}
class PopCommand implements fc.Command {
check(m: Readonly): boolean {
// should not call pop on empty list
return m.num > 0;
}
run(m: Model, r: List): void {
assert.equal(typeof r.pop(), 'number');
--m.num;
}
toString = () => 'pop';
}
class SizeCommand implements fc.Command {
check = (m: Readonly) => true;
run(m: Model, r: List): void {
assert.equal(r.size(), m.num);
}
toString = () => 'size';
}
```
Now that all our commands are ready, we can run everything:
```typescript
// define the possible commands and their inputs
const allCommands = [
fc.integer().map((v) => new PushCommand(v)),
fc.constant(new PopCommand()),
fc.constant(new SizeCommand()),
];
// run everything
fc.assert(
fc.property(fc.commands(allCommands, { size: '+1' }), (cmds) => {
const s = () => ({ model: { num: 0 }, real: new List() });
fc.modelRun(s, cmds);
}),
);
```
### Replay model-based tests
Contrary to other arbitraries, commands built using `commands` requires an extra parameter for replay purposes. In addition of passing `{ seed, path }` to `assert`, `commands` must be called with `{ replayPath: string }`.
Whenever `assert` encounters a failure with `commands`, it displays an error log featuring both the seed, path and replayPath to replay it. For instance, in the output below the seed is 670108017, the path 96:5 and the replayPath is AAAAABAAE:VF.
```
Property failed after 97 tests
{ seed: 670108017, path: "96:5", endOnFailure: true }
Counterexample: [PlayToken[0],NewGame,PlayToken[1],Refresh /*replayPath="AAAAABAAE:VF"*/]
Shrunk 1 time(s)
Got error: Error: expect(received).toEqual(expected)
```
In order to replay the failure on the counterexample - `[PlayToken[0],NewGame,PlayToken[1],Refresh]`, you have to change your code as follow:
```typescript
// Original code
fc.assert(
fc.property(
fc.commands(/* array of commands */),
checkEverythingIsOk
)
);
// Replay code: straight to the minimal counterexample.
// It only replays the minimal counterexample.
fc.assert(
fc.property(
fc.commands(
/* array of commands */,
{ replayPath: 'AAAAABAAE:VF' }
),
checkEverythingIsOk
),
{ seed: 670108017, path: '96:5', endOnFailure: true }
);
```
:::info[Why is there something specific to do for commands?]
In order to come with a more efficient shrinker, `commands` takes into account the commands that have really been executed.
Basically if the framework generated the following commands `[A,B,C,A,A,C]` but only executed `[A,-,C,A,-,-]` it will shrink only `[A,C,A]`.
The value stored into `replayPath` encodes the history of what was really executed in order not re-run any intermediate step on replay.
:::
---
## Race conditions
Easily detect race conditions in your JavaScript code
### Overview
Race conditions can easily occur in JavaScript due to its event-driven nature. Any situation where JavaScript has the ability to schedule tasks could potentially lead to race conditions.
> A race condition […] is the condition […] where the system's substantive behavior is dependent on the **sequence** or timing of other **uncontrollable events**.
_Source: https://en.wikipedia.org/wiki/Race_condition_
Identifying and fixing race conditions can be challenging as they can occur unexpectedly. It requires a thorough understanding of potential event flows and often involves using advanced debugging and testing tools. To address this issue, fast-check includes a set of built-in tools specifically designed to help in detecting race conditions. The [`scheduler`](/docs/core-blocks/arbitraries/others/#scheduler) arbitrary has been specifically designed for detecting and testing race conditions, making it an ideal tool for addressing these challenges in your testing process.
### The scheduler instance
The [`scheduler`](/docs/core-blocks/arbitraries/others/#scheduler) arbitrary is able to generate instances of [`Scheduler`](/docs/api/interfaces/Scheduler). They come with following interface:
- `schedule: (task: Promise, label?: string, metadata?: TMetadata, act?: SchedulerAct) => Promise` - Wrap an existing promise using the scheduler. The newly created promise will resolve when the scheduler decides to resolve it (see `waitFor`, `waitNext` and `waitIdle` methods).
- `scheduleFunction: (asyncFunction: (...args: TArgs) => Promise, act?: SchedulerAct) => (...args: TArgs) => Promise` - Wrap all the promise produced by an API using the scheduler. `scheduleFunction(callApi)`
- `scheduleSequence(sequenceBuilders: SchedulerSequenceItem[], act?: SchedulerAct): { done: boolean; faulty: boolean, task: Promise<{ done: boolean; faulty: boolean }> }` - Schedule a sequence of operations. Each operation requires the previous one to be resolved before being started. Each of the operations will be executed until its end before starting any other scheduled operation.
- `waitNext: (count: number, customAct?: SchedulerAct)=> Promise` - Wait and schedule exactly `count` scheduled tasks.
- `waitIdle: (customAct?: SchedulerAct) => Promise` - Wait until the scheduler becomes idle. This includes currently scheduled tasks and any additional ones they recursively schedule. Cannot await tasks triggered by uncontrolled sources like `fetch` or external event emitters. Prefer `waitNext` or `waitFor` if you know what you are waiting for.
- `waitFor: (unscheduledTask: Promise, act?: SchedulerAct) => Promise` - Wait as many scheduled tasks as need to resolve the received task. Contrary to `waitOne` or `waitAll` it can be used to wait for calls not yet scheduled when calling it (some test solutions like supertest use such trick not to run any query before the user really calls then on the request itself). Be aware that while this helper will wait eveything to be ready for `unscheduledTask` to resolve, having uncontrolled tasks triggering stuff required for `unscheduledTask` might make replay of failures harder as such asynchronous triggers stay out-of-control for fast-check.
- `report: () => SchedulerReportItem[]` - Produce an array containing all the scheduled tasks so far with their execution status. If the task has been executed, it includes a string representation of the associated output or error produced by the task if any. Tasks will be returned in the order they get executed by the scheduler.
And deprecated primitives:
- `count(): number` - Number of pending tasks waiting to be scheduled by the scheduler — _deprecated since v4.2.0, no replacement_
- `waitOne: (act?: SchedulerAct) => Promise` - Wait one scheduled task to be executed. Throws if there is no more pending tasks — _deprecated since v4.2.0, prefer `waitNext(1)`_
- `waitAll: (act?: SchedulerAct) => Promise` - Wait all scheduled tasks, including the ones that might be created by one of the resolved task. Do not use if `waitAll` call has to be wrapped into an helper function such as `act` that can relaunch new tasks afterwards. In this specific case use a `while` loop running while `count() !== 0` and calling `waitOne` - _see CodeSandbox example on userProfile_ — _deprecated since v4.2.0, prefer `waitIdle`_
With:
```ts
type SchedulerSequenceItem =
{ builder: () => Promise; label: string; metadata?: TMetadata } | (() => Promise);
```
You can also define an hardcoded scheduler by using `fc.schedulerFor(ordering: number[])` - _should be passed through `fc.constant` if you want to use it as an arbitrary_. For instance: `fc.schedulerFor([1,3,2])` means that the first scheduled promise will resolve first, the third one second and at the end we will resolve the second one that have been scheduled.
### Scheduling methods
#### schedule
Create a scheduled `Promise` based on an existing one — _aka. wrapped `Promise`_.
The life-cycle of the wrapped `Promise` will not be altered at all.
On its side the scheduled `Promise` will only resolve when the scheduler decides it.
Once scheduled by the scheduler, the scheduler will wait the wrapped `Promise` to resolve before sheduling anything else.
:::warning[Catching exceptions is your responsability]
Similar to any other `Promise`, if there is a possibility that the wrapped `Promise` may be rejected, you have to handle the output of the scheduled `Promise` on your end, just as you would with the original `Promise`.
:::
**Signature**
```ts
schedule: (task: Promise) => Promise;
schedule: (task: Promise, label?: string, metadata?: TMetadata, customAct?: SchedulerAct) => Promise;
```
**Usage**
Any algorithm taking raw `Promise` as input might be tested using this scheduler.
For instance, `Promise.all` and `Promise.race` are examples of such algorithms.
**Snippet**
```ts
// Let suppose:
// - s : Scheduler
// - shortTask: Promise - Very quick operation
// - longTask : Promise - Relatively long operation
shortTask.then(() => {
// not impacted by the scheduler
// as it is directly using the original promise
});
const scheduledShortTask = s.schedule(shortTask);
const scheduledLongTask = s.schedule(longTask);
// Even if in practice, shortTask is quicker than longTask
// If the scheduler selected longTask to end first,
// it will wait longTask to end, then once ended it will resolve scheduledLongTask,
// while scheduledShortTask will still be pending until scheduled.
await s.waitNext(1);
```
#### scheduleFunction
Create a producer of scheduled `Promise`.
Many asynchronous codes utilize functions that can produce `Promise` based on inputs. For example, fetching from a REST API using `fetch("http://domain/")` or accessing data from a database `db.query("SELECT * FROM table")`.
`scheduleFunction` is able to re-order when these `Promise` resolveby waiting the go of the scheduler.
**Signature**
```ts
scheduleFunction: (asyncFunction: (...args: TArgs) => Promise, customAct?: SchedulerAct) =>
(...args: TArgs) =>
Promise;
```
**Usage**
Any algorithm making calls to asynchronous APIs can highly benefit from this wrapper to re-order calls.
:::warning[Only postpone the resolution]
`scheduleFunction` is only postponing the resolution of the function. The call to the function itself is started immediately when the caller calls something on the scheduled function.
:::
**Snippet**
```ts
// Let suppose:
// - s : Scheduler
// - getUserDetails: (uid: string) => Promise - API call to get details for a User
const getUserDetailsScheduled = s.scheduleFunction(getUserDetails);
getUserDetailsScheduled('user-001')
// What happened under the hood?
// - A call to getUserDetails('user-001') has been triggered
// - The promise returned by the call to getUserDetails('user-001') has been registered to the scheduler
.then((dataUser001) => {
// This block will only be executed when the scheduler
// will schedule this Promise
});
// Unlock one of the scheduled Promise registered on s
// Not necessarily the first one that resolves,
// not necessarily the first one that got scheduled
await s.waitNext(1);
```
#### scheduleSequence
Create a sequence of asynchrnous calls running in a precise order.
:::info[While running, tasks prevent others to complete]
One important fact about scheduled sequence is that whenever one task of the sequence gets scheduled, no other scheduled task in the scheduler can be unqueued while this task has not ended. It means that tasks defined within a scheduled sequence must not require other scheduled task to end to fulfill themselves — _it does not mean that they should not force the scheduling of other scheduled tasks_.
:::
**Signature**
```ts
type SchedulerSequenceItem =
{ builder: () => Promise; label: string } |
(() => Promise)
;
scheduleSequence(sequenceBuilders: SchedulerSequenceItem[], customAct?: SchedulerAct): { done: boolean; faulty: boolean, task: Promise<{ done: boolean; faulty: boolean }> }
```
**Usage**
You want to check the status of a database, a webpage after many known operations.
:::tip[Alternative]
Most of the time, model based testing might be a better fit for that purpose.
:::
**Snippet**
```jsx
// Let suppose:
// - s: Scheduler
const initialUserId = '001';
const otherUserId1 = '002';
const otherUserId2 = '003';
// render profile for user {initialUserId}
// Note: api calls to get back details for one user are also scheduled
const { rerender } = render();
s.scheduleSequence([
async () => rerender(),
async () => rerender(),
]);
await s.waitIdle();
// expect to see profile for user otherUserId2
```
### Advanced recipes
#### Scheduling a function call
In some tests, we may want to experiment with scenarios where multiple queries are launched concurrently towards our service to observe its behavior in the context of concurrent operations.
```ts
const scheduleCall = (s: Scheduler, f: () => Promise) => {
s.schedule(Promise.resolve('Start the call')).then(() => f());
};
// Calling doStuff will be part of the task scheduled in s
scheduleCall(s, () => doStuff());
```
#### Scheduling a call to a mocked server
Unlike the behavior of `scheduleFunction`, actual calls to servers are not instantaneous, and you may want to schedule when the call reaches your mocked-server.
For instance, suppose you are creating a TODO-list application. In this app, users can only add a new TODO item if there is no other item with the same label. If you utilize the built-in `scheduleFunction` to test this feature, the mocked-server will always receive the calls in the same order as they were made.
```ts
const scheduleMockedServerFunction = (
s: Scheduler,
f: (...args: TArgs) => Promise,
) => {
return (...args: TArgs) => {
return s.schedule(Promise.resolve('Server received the call')).then(() => f(...args));
};
};
const newAddTodo = scheduleMockedServerFunction(s, (label) => mockedApi.addTodo(label));
// With newAddTodo = s.scheduleFunction((label) => mockedApi.addTodo(label))
// The mockedApi would have received todo-1 first, followed by todo-2
// When each of those calls resolve would have been the responsibility of s
// In the contrary, with scheduleMockedServerFunction, the mockedApi might receive todo-2 first.
newAddTodo('todo-1'); // .then
newAddTodo('todo-2'); // .then
// or...
const scheduleMockedServerFunction = (
s: Scheduler,
f: (...args: TArgs) => Promise,
) => {
const scheduledF = s.scheduleFunction(f);
return (...args: TArgs) => {
return s.schedule(Promise.resolve('Server received the call')).then(() => scheduledF(...args));
};
};
```
#### Wrapping calls automatically using `act`
[`scheduler`](/docs/core-blocks/arbitraries/others/#scheduler) can be given an `act` function that will be called in order to wrap all the scheduled tasks. A code like the following one:
```js
fc.assert(
fc.asyncProperty(fc.scheduler({ act }), async s => () {
// Pushing tasks into the scheduler ...
// ....................................
await s.waitIdle();
}))
```
This pattern can be helpful whenever you need to make sure that continuations attached to your tasks get called in proper contexts. For instance, when testing React applications, one cannot perform updates of states outside of `act`.
:::tip[Finer act]
The `act` function can be defined on case by case basis instead of being defined globally for all tasks. Check the `act` argument available on the methods of the scheduler.
:::
#### Scheduling native timers
Occasionally, our asynchronous code depends on native timers provided by the JavaScript engine, such as `setTimeout` or `setInterval`. Unlike other asynchronous operations, timers are ordered, meaning that a timer set to wait for 10ms will be executed before a timer set to wait for 100ms. Consequently, they require special handling.
The code snippet below defines a custom `act` function able to schedule timers. It uses [Jest](https://jestjs.io/), but it can be modified for other testing frameworks if necessary.
```ts
// You should call: `jest.useFakeTimers()` at the beginning of your test
// The function below automatically schedules tasks for pending timers.
// It detects any timer added when tasks get resolved by the scheduler (via the act pattern).
// Instead of calling `await s.waitFor(p)`, you can call `await s.waitFor(p, buildWrapWithTimersAct(s))`.
// Instead of calling `await s.waitIdle()`, you can call `await s.waitIdle(buildWrapWithTimersAct(s))`.
function buildWrapWithTimersAct(s: fc.Scheduler) {
let timersAlreadyScheduled = false;
function scheduleTimersIfNeeded() {
if (timersAlreadyScheduled || jest.getTimerCount() === 0) {
return;
}
timersAlreadyScheduled = true;
s.schedule(Promise.resolve('advance timers')).then(() => {
timersAlreadyScheduled = false;
jest.advanceTimersToNextTimer();
scheduleTimersIfNeeded();
});
}
return async function wrapWithTimersAct(f: () => Promise) {
try {
await f();
} finally {
scheduleTimersIfNeeded();
}
};
}
```
### Model based testing and race conditions
Model-based testing features can be combined with race condition detection through the use of [`scheduledModelRun`](/docs/api/functions/scheduledModelRun). By utilizing this function, the execution of the model will also be processed through the scheduler.
:::warning[Do not depend on other scheduled tasks in the model]
Neither `check` nor `run` should rely on the completion of other scheduled tasks to fulfill themselves. But they can still trigger new scheduled tasks as long as they don't wait for them to resolve.
:::
---
## AI-Powered Testing 🧙
Enhance your testing workflow with AI assistance while maintaining high-quality test coverage using fast-check.
### Configure your AI for Testing Excellence
fast-check provides an expert-level JavaScript testing skill that teaches AI assistants best practices for writing high-quality tests.
Install the skill to your AI assistant:
```bash
npx skills add dubzzz/fast-check --skill javascript-testing-expert
```
### Objectives of the skill
The `javascript-testing-expert` skill focuses on four main objectives:
1. Uncover hard to detect bugs
2. Document how to use the code
3. Avoid regressions
4. Challenge the code
### External resources
- [View the skill on skills.sh](https://skills.sh/dubzzz/fast-check/javascript-testing-expert)
- [View the skill definition on GitHub](https://github.com/dubzzz/fast-check/tree/main/skills/javascript-testing-expert)
---
## Abstract Class: Arbitrary\
Defined in: [packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts:14](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts#L14)
Abstract class able to generate values on type `T`
The values generated by an instance of Arbitrary can be previewed - with [sample](../functions/sample.md) - or classified - with [statistics](../functions/statistics.md).
### Remarks
Since 0.0.7
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Constructors
#### Constructor
> **new Arbitrary**\<`T`\>(): `Arbitrary`\<`T`\>
##### Returns
`Arbitrary`\<`T`\>
### Methods
#### canShrinkWithoutContext() {#canshrinkwithoutcontext}
> `abstract` **canShrinkWithoutContext**(`value`): `value is T`
Defined in: [packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts:42](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts#L42)
Check if a given value could be pass to `shrink` without providing any context.
In general, `canShrinkWithoutContext` is not designed to be called for each `shrink` but rather on very special cases.
Its usage must be restricted to `canShrinkWithoutContext` or in the rare* contexts of a `shrink` method being called without
any context. In this ill-formed case of `shrink`, `canShrinkWithoutContext` could be used or called if needed.
*we fall in that case when fast-check is asked to shrink a value that has been provided manually by the user,
in other words: a value not coming from a call to `generate` or a normal `shrink` with context.
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value` | `unknown` | Value to be assessed |
##### Returns
`value is T`
`true` if and only if the value could have been generated by this instance
##### Remarks
Since 3.0.0
***
#### chain() {#chain}
> **chain**\<`U`\>(`chainer`): `Arbitrary`\<`U`\>
Defined in: [packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts:140](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts#L140)
Create another arbitrary by mapping a value from a base Arbirary using the provided `fmapper`
Values produced by the new arbitrary are the result of the arbitrary generated by applying `fmapper` to a value
##### Type Parameters
| Type Parameter |
| ------ |
| `U` |
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `chainer` | (`t`) => `Arbitrary`\<`U`\> | Chain function, to produce a new Arbitrary using a value from another Arbitrary |
##### Returns
`Arbitrary`\<`U`\>
New arbitrary of new type
##### Example
```typescript
const arrayAndLimitArbitrary = fc.nat().chain((c: number) => fc.tuple( fc.array(fc.nat(c)), fc.constant(c)));
```
##### Remarks
Since 1.2.0
***
#### filter() {#filter}
##### Call Signature
> **filter**\<`U`\>(`refinement`): `Arbitrary`\<`U`\>
Defined in: [packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts:78](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts#L78)
Create another arbitrary by filtering values against `predicate`
All the values produced by the resulting arbitrary
satisfy `predicate(value) == true`
Be aware that using filter may highly impact the time required to generate a valid entry
###### Type Parameters
| Type Parameter |
| ------ |
| `U` |
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `refinement` | (`t`) => `t is U` | Predicate, to test each produced element. Return true to keep the element, false otherwise |
###### Returns
`Arbitrary`\<`U`\>
New arbitrary filtered using predicate
###### Example
```typescript
const integerGenerator: Arbitrary = ...;
const evenIntegerGenerator: Arbitrary = integerGenerator.filter(e => e % 2 === 0);
// new Arbitrary only keeps even values
```
###### Remarks
Since 1.23.0
##### Call Signature
> **filter**(`predicate`): `Arbitrary`\<`T`\>
Defined in: [packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts:99](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts#L99)
Create another arbitrary by filtering values against `predicate`
All the values produced by the resulting arbitrary
satisfy `predicate(value) == true`
Be aware that using filter may highly impact the time required to generate a valid entry
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `predicate` | (`t`) => `boolean` | Predicate, to test each produced element. Return true to keep the element, false otherwise |
###### Returns
`Arbitrary`\<`T`\>
New arbitrary filtered using predicate
###### Example
```typescript
const integerGenerator: Arbitrary = ...;
const evenIntegerGenerator: Arbitrary = integerGenerator.filter(e => e % 2 === 0);
// new Arbitrary only keeps even values
```
###### Remarks
Since 0.0.1
***
#### generate() {#generate}
> `abstract` **generate**(`mrng`, `biasFactor`): [`Value`](Value.md)\<`T`\>
Defined in: [packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts:25](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts#L25)
Generate a value of type `T` along with its context (if any)
based on the provided random number generator
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `mrng` | [`Random`](Random.md) | Random number generator |
| `biasFactor` | `number` \| `undefined` | If taken into account 1 value over biasFactor must be biased. Either integer value greater or equal to 2 (bias) or undefined (no bias) |
##### Returns
[`Value`](Value.md)\<`T`\>
Random value of type `T` and its context
##### Remarks
Since 0.0.1 (return type changed in 3.0.0)
***
#### map() {#map}
> **map**\<`U`\>(`mapper`, `unmapper?`): `Arbitrary`\<`U`\>
Defined in: [packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts:122](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts#L122)
Create another arbitrary by mapping all produced values using the provided `mapper`
Values produced by the new arbitrary are the result of applying `mapper` value by value
##### Type Parameters
| Type Parameter |
| ------ |
| `U` |
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `mapper` | (`t`) => `U` | Map function, to produce a new element based on an old one |
| `unmapper?` | (`possiblyU`) => `T` | Optional unmap function, it will never be used except when shrinking user defined values. Must throw if value is not compatible (since 3.0.0) |
##### Returns
`Arbitrary`\<`U`\>
New arbitrary with mapped elements
##### Example
```typescript
const rgbChannels: Arbitrary<{r:number,g:number,b:number}> = ...;
const color: Arbitrary = rgbChannels.map(ch => `#${(ch.r*65536 + ch.g*256 + ch.b).toString(16).padStart(6, '0')}`);
// transform an Arbitrary producing {r,g,b} integers into an Arbitrary of '#rrggbb'
```
##### Remarks
Since 0.0.1
***
#### shrink() {#shrink}
> `abstract` **shrink**(`value`, `context`): [`Stream`](Stream.md)\<[`Value`](Value.md)\<`T`\>\>
Defined in: [packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts:56](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Arbitrary.ts#L56)
Shrink a value of type `T`, may rely on the context previously provided to shrink efficiently
Must never be called with possibly invalid values and no context without ensuring that such call is legal
by calling `canShrinkWithoutContext` first on the value.
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value` | `T` | The value to shrink |
| `context` | `unknown` | Its associated context (the one returned by generate) or `undefined` if no context but `canShrinkWithoutContext(value) === true` |
##### Returns
[`Stream`](Stream.md)\<[`Value`](Value.md)\<`T`\>\>
Stream of shrinks for value based on context (if provided)
##### Remarks
Since 3.0.0
---
## Class: PreconditionFailure
Defined in: [packages/fast-check/src/check/precondition/PreconditionFailure.ts:9](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/precondition/PreconditionFailure.ts#L9)
Error type produced whenever a precondition fails
### Remarks
Since 2.2.0
### Extends
- `Error`
### Constructors
#### Constructor
> **new PreconditionFailure**(`interruptExecution?`): `PreconditionFailure`
Defined in: [packages/fast-check/src/check/precondition/PreconditionFailure.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/precondition/PreconditionFailure.ts#L12)
##### Parameters
| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `interruptExecution` | `boolean` | `false` |
##### Returns
`PreconditionFailure`
##### Overrides
`Error.constructor`
### Properties
#### cause? {#cause}
> `optional` **cause?**: `unknown`
Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es2022.error.d.ts:24
##### Inherited from
`Error.cause`
***
#### interruptExecution {#interruptexecution}
> `readonly` **interruptExecution**: `boolean` = `false`
Defined in: [packages/fast-check/src/check/precondition/PreconditionFailure.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/precondition/PreconditionFailure.ts#L12)
***
#### message {#message}
> **message**: `string`
Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1075
##### Inherited from
`Error.message`
***
#### name {#name}
> **name**: `string`
Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1074
##### Inherited from
`Error.name`
***
#### stack? {#stack}
> `optional` **stack?**: `string`
Defined in: node\_modules/.pnpm/typescript@6.0.3/node\_modules/typescript/lib/lib.es5.d.ts:1076
##### Inherited from
`Error.stack`
***
#### stackTraceLimit {#stacktracelimit}
> `static` **stackTraceLimit**: `number`
Defined in: node\_modules/.pnpm/@types+node@24.13.3/node\_modules/@types/node/globals.d.ts:68
The `Error.stackTraceLimit` property specifies the number of stack frames
collected by a stack trace (whether generated by `new Error().stack` or
`Error.captureStackTrace(obj)`).
The default value is `10` but may be set to any valid JavaScript number. Changes
will affect any stack trace captured _after_ the value has been changed.
If set to a non-number value, or set to a negative number, stack traces will
not capture any frames.
##### Inherited from
`Error.stackTraceLimit`
### Methods
#### captureStackTrace() {#capturestacktrace}
> `static` **captureStackTrace**(`targetObject`, `constructorOpt?`): `void`
Defined in: node\_modules/.pnpm/@types+node@24.13.3/node\_modules/@types/node/globals.d.ts:52
Creates a `.stack` property on `targetObject`, which when accessed returns
a string representing the location in the code at which
`Error.captureStackTrace()` was called.
```js
const myObject = {};
Error.captureStackTrace(myObject);
myObject.stack; // Similar to `new Error().stack`
```
The first line of the trace will be prefixed with
`${myObject.name}: ${myObject.message}`.
The optional `constructorOpt` argument accepts a function. If given, all frames
above `constructorOpt`, including `constructorOpt`, will be omitted from the
generated stack trace.
The `constructorOpt` argument is useful for hiding implementation
details of error generation from the user. For instance:
```js
function a() {
b();
}
function b() {
c();
}
function c() {
// Create an error without stack trace to avoid calculating the stack trace twice.
const { stackTraceLimit } = Error;
Error.stackTraceLimit = 0;
const error = new Error();
Error.stackTraceLimit = stackTraceLimit;
// Capture the stack trace above function b
Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace
throw error;
}
a();
```
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `targetObject` | `object` |
| `constructorOpt?` | `Function` |
##### Returns
`void`
##### Inherited from
`Error.captureStackTrace`
***
#### isFailure() {#isfailure}
> `static` **isFailure**(`err`): `err is PreconditionFailure`
Defined in: [packages/fast-check/src/check/precondition/PreconditionFailure.ts:16](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/precondition/PreconditionFailure.ts#L16)
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `err` | `unknown` |
##### Returns
`err is PreconditionFailure`
***
#### prepareStackTrace() {#preparestacktrace}
> `static` **prepareStackTrace**(`err`, `stackTraces`): `any`
Defined in: node\_modules/.pnpm/@types+node@24.13.3/node\_modules/@types/node/globals.d.ts:56
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `err` | `Error` |
| `stackTraces` | `CallSite`[] |
##### Returns
`any`
##### See
https://v8.dev/docs/stack-trace-api#customizing-stack-traces
##### Inherited from
`Error.prepareStackTrace`
---
## Class: Random
Defined in: [packages/fast-check/src/random/generator/Random.ts:17](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/random/generator/Random.ts#L17)
Wrapper around an instance of a `pure-rand`'s random number generator
offering a simpler interface to deal with random with impure patterns
### Constructors
#### Constructor
> **new Random**(`sourceRng`): `Random`
Defined in: [packages/fast-check/src/random/generator/Random.ts:25](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/random/generator/Random.ts#L25)
Create a mutable random number generator by cloning the passed one and mutate it
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `sourceRng` | `any` | Immutable random generator from pure-rand library, will not be altered (a clone will be) |
##### Returns
`Random`
### Methods
#### clone() {#clone}
> **clone**(): `Random`
Defined in: [packages/fast-check/src/random/generator/Random.ts:32](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/random/generator/Random.ts#L32)
Clone the random number generator
##### Returns
`Random`
***
#### getState() {#getstate}
> **getState**(): readonly `number`[] \| `undefined`
Defined in: [packages/fast-check/src/random/generator/Random.ts:90](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/random/generator/Random.ts#L90)
Extract the internal state of the internal RandomGenerator backing the current instance of Random
##### Returns
readonly `number`[] \| `undefined`
***
#### ~~next()~~ {#next}
> **next**(`bits`): `number`
Defined in: [packages/fast-check/src/random/generator/Random.ts:41](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/random/generator/Random.ts#L41)
Generate an integer having `bits` random bits
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `bits` | `number` | Number of bits to generate |
##### Returns
`number`
##### Deprecated
Prefer [nextInt](#nextint) with explicit bounds: `nextInt(0, (1 << bits) - 1)`
***
#### nextBigInt() {#nextbigint}
> **nextBigInt**(`min`, `max`): `bigint`
Defined in: [packages/fast-check/src/random/generator/Random.ts:74](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/random/generator/Random.ts#L74)
Generate a random bigint between min (included) and max (included)
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `min` | `bigint` | Minimal bigint value |
| `max` | `bigint` | Maximal bigint value |
##### Returns
`bigint`
***
#### nextBoolean() {#nextboolean}
> **nextBoolean**(): `boolean`
Defined in: [packages/fast-check/src/random/generator/Random.ts:49](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/random/generator/Random.ts#L49)
Generate a random boolean
##### Returns
`boolean`
***
#### nextDouble() {#nextdouble}
> **nextDouble**(): `number`
Defined in: [packages/fast-check/src/random/generator/Random.ts:81](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/random/generator/Random.ts#L81)
Generate a random floating point number between 0.0 (included) and 1.0 (excluded)
##### Returns
`number`
***
#### nextInt() {#nextint}
##### Call Signature
> **nextInt**(): `number`
Defined in: [packages/fast-check/src/random/generator/Random.ts:57](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/random/generator/Random.ts#L57)
Generate a random integer (32 bits)
###### Returns
`number`
###### Deprecated
Prefer [nextInt](#nextint) with explicit bounds: `nextInt(-2147483648, 2147483647)`
##### Call Signature
> **nextInt**(`min`, `max`): `number`
Defined in: [packages/fast-check/src/random/generator/Random.ts:64](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/random/generator/Random.ts#L64)
Generate a random integer between min (included) and max (included)
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `min` | `number` | Minimal integer value |
| `max` | `number` | Maximal integer value |
###### Returns
`number`
---
## Class: Stream\
Defined in: [packages/fast-check/src/stream/Stream.ts:20](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L20)
Wrapper around `IterableIterator` interface
offering a set of helpers to deal with iterations in a simple way
### Remarks
Since 0.0.7
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Implements
- `IterableIterator`\<`T`\>
### Constructors
#### Constructor
> **new Stream**\<`T`\>(`g`): `Stream`\<`T`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:46](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L46)
Create a Stream based on `g`
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `g` | `IterableIterator`\<`T`\> | Underlying data of the Stream |
##### Returns
`Stream`\<`T`\>
### Methods
#### \[iterator\]() {#iterator}
> **\[iterator\]**(): `IterableIterator`\<`T`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:58](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L58)
##### Returns
`IterableIterator`\<`T`\>
##### Implementation of
`IterableIterator.[iterator]`
***
#### drop() {#drop}
> **drop**(`n`): `Stream`\<`T`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:114](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L114)
Drop `n` first elements of the Stream
WARNING: It closes the current stream
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `n` | `number` | Number of elements to drop |
##### Returns
`Stream`\<`T`\>
##### Remarks
Since 0.0.1
***
#### dropWhile() {#dropwhile}
> **dropWhile**(`f`): `Stream`\<`T`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:96](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L96)
Drop elements from the Stream while `f(element) === true`
WARNING: It closes the current stream
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `f` | (`v`) => `boolean` | Drop condition |
##### Returns
`Stream`\<`T`\>
##### Remarks
Since 0.0.1
***
#### every() {#every}
> **every**(`f`): `boolean`
Defined in: [packages/fast-check/src/stream/Stream.ts:180](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L180)
Check whether all elements of the Stream are successful for `f`
WARNING: It closes the current stream
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `f` | (`v`) => `boolean` | Condition to check |
##### Returns
`boolean`
##### Remarks
Since 0.0.1
***
#### filter() {#filter}
##### Call Signature
> **filter**\<`U`\>(`f`): `Stream`\<`U`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:157](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L157)
Filter elements of the Stream
WARNING: It closes the current stream
###### Type Parameters
| Type Parameter |
| ------ |
| `U` |
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `f` | (`v`) => `v is U` | Elements to keep |
###### Returns
`Stream`\<`U`\>
###### Remarks
Since 1.23.0
##### Call Signature
> **filter**(`f`): `Stream`\<`T`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:166](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L166)
Filter elements of the Stream
WARNING: It closes the current stream
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `f` | (`v`) => `boolean` | Elements to keep |
###### Returns
`Stream`\<`T`\>
###### Remarks
Since 0.0.1
***
#### flatMap() {#flatmap}
> **flatMap**\<`U`\>(`f`): `Stream`\<`U`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:83](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L83)
Flat map all elements of the Stream using `f`
WARNING: It closes the current stream
##### Type Parameters
| Type Parameter |
| ------ |
| `U` |
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `f` | (`v`) => `IterableIterator`\<`U`\> | Mapper function |
##### Returns
`Stream`\<`U`\>
##### Remarks
Since 0.0.1
***
#### getNthOrLast() {#getnthorlast}
> **getNthOrLast**(`nth`): `T` \| `null`
Defined in: [packages/fast-check/src/stream/Stream.ts:228](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L228)
Take the `nth` element of the Stream of the last (if it does not exist)
WARNING: It closes the current stream
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `nth` | `number` | Position of the element to extract |
##### Returns
`T` \| `null`
##### Remarks
Since 0.0.12
***
#### has() {#has}
> **has**(`f`): \[`boolean`, `T` \| `null`\]
Defined in: [packages/fast-check/src/stream/Stream.ts:197](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L197)
Check whether one of the elements of the Stream is successful for `f`
WARNING: It closes the current stream
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `f` | (`v`) => `boolean` | Condition to check |
##### Returns
\[`boolean`, `T` \| `null`\]
##### Remarks
Since 0.0.1
***
#### join() {#join}
> **join**(...`others`): `Stream`\<`T`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:215](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L215)
Join `others` Stream to the current Stream
WARNING: It closes the current stream and the other ones (as soon as it iterates over them)
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| ...`others` | `IterableIterator`\<`T`, `any`, `any`\>[] | Streams to join to the current Stream |
##### Returns
`Stream`\<`T`\>
##### Remarks
Since 0.0.1
***
#### map() {#map}
> **map**\<`U`\>(`f`): `Stream`\<`U`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:71](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L71)
Map all elements of the Stream using `f`
WARNING: It closes the current stream
##### Type Parameters
| Type Parameter |
| ------ |
| `U` |
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `f` | (`v`) => `U` | Mapper function |
##### Returns
`Stream`\<`U`\>
##### Remarks
Since 0.0.1
***
#### next() {#next}
> **next**(): `IteratorResult`\<`T`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:55](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L55)
##### Returns
`IteratorResult`\<`T`\>
##### Implementation of
`IterableIterator.next`
***
#### take() {#take}
> **take**(`n`): `Stream`\<`T`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:144](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L144)
Take `n` first elements of the Stream
WARNING: It closes the current stream
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `n` | `number` | Number of elements to take |
##### Returns
`Stream`\<`T`\>
##### Remarks
Since 0.0.1
***
#### takeWhile() {#takewhile}
> **takeWhile**(`f`): `Stream`\<`T`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:132](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L132)
Take elements from the Stream while `f(element) === true`
WARNING: It closes the current stream
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `f` | (`v`) => `boolean` | Take condition |
##### Returns
`Stream`\<`T`\>
##### Remarks
Since 0.0.1
***
#### nil() {#nil}
> `static` **nil**\<`T`\>(): `Stream`\<`T`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:25](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L25)
Create an empty stream of T
##### Type Parameters
| Type Parameter |
| ------ |
| `T` |
##### Returns
`Stream`\<`T`\>
##### Remarks
Since 0.0.1
***
#### of() {#of}
> `static` **of**\<`T`\>(...`elements`): `Stream`\<`T`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:35](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L35)
Create a stream of T from a variable number of elements
##### Type Parameters
| Type Parameter |
| ------ |
| `T` |
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| ...`elements` | `T`[] | Elements used to create the Stream |
##### Returns
`Stream`\<`T`\>
##### Remarks
Since 2.12.0
---
## Class: Value\
Defined in: [packages/fast-check/src/check/arbitrary/definition/Value.ts:13](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Value.ts#L13)
A `Value` holds an internal value of type `T`
and its associated context
### Remarks
Since 3.0.0 (previously called `NextValue` in 2.15.0)
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Constructors
#### Constructor
> **new Value**\<`T`\>(`value_`, `context`, `customGetValue?`): `Value`\<`T`\>
Defined in: [packages/fast-check/src/check/arbitrary/definition/Value.ts:50](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Value.ts#L50)
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value_` | `T` | Internal value of the shrinkable |
| `context` | `unknown` | Context associated to the generated value (useful for shrink) |
| `customGetValue?` | () => `T` | Limited to internal usages (to ease migration to next), it will be removed on next major |
##### Returns
`Value`\<`T`\>
### Properties
#### context {#context}
> `readonly` **context**: `unknown`
Defined in: [packages/fast-check/src/check/arbitrary/definition/Value.ts:43](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Value.ts#L43)
Context for the generated value
TODO - Do we want to clone it too?
##### Remarks
2.15.0
***
#### hasToBeCloned {#hastobecloned}
> `readonly` **hasToBeCloned**: `boolean`
Defined in: [packages/fast-check/src/check/arbitrary/definition/Value.ts:19](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Value.ts#L19)
State storing the result of hasCloneMethod
If `true` the value will be cloned each time it gets accessed
##### Remarks
Since 2.15.0
***
#### value {#value}
> `readonly` **value**: `T`
Defined in: [packages/fast-check/src/check/arbitrary/definition/Value.ts:32](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Value.ts#L32)
Safe value of the shrinkable
Depending on `hasToBeCloned` it will either be `value_` or a clone of it
##### Remarks
Since 2.15.0
***
#### value\_ {#value_}
> `readonly` **value\_**: `T`
Defined in: [packages/fast-check/src/check/arbitrary/definition/Value.ts:37](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/arbitrary/definition/Value.ts#L37)
Internal value of the shrinkable
##### Remarks
Since 2.15.0
---
## Enumeration: ExecutionStatus
Defined in: [packages/fast-check/src/check/runner/reporter/ExecutionStatus.ts:6](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/ExecutionStatus.ts#L6)
Status of the execution of the property
### Remarks
Since 1.9.0
### Enumeration Members
#### Failure {#failure}
> **Failure**: `1`
Defined in: [packages/fast-check/src/check/runner/reporter/ExecutionStatus.ts:9](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/ExecutionStatus.ts#L9)
***
#### Skipped {#skipped}
> **Skipped**: `-1`
Defined in: [packages/fast-check/src/check/runner/reporter/ExecutionStatus.ts:8](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/ExecutionStatus.ts#L8)
***
#### Success {#success}
> **Success**: `0`
Defined in: [packages/fast-check/src/check/runner/reporter/ExecutionStatus.ts:7](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/ExecutionStatus.ts#L7)
---
## Enumeration: VerbosityLevel
Defined in: [packages/fast-check/src/check/runner/configuration/VerbosityLevel.ts:6](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/VerbosityLevel.ts#L6)
Verbosity level
### Remarks
Since 1.9.1
### Enumeration Members
#### None {#none}
> **None**: `0`
Defined in: [packages/fast-check/src/check/runner/configuration/VerbosityLevel.ts:16](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/VerbosityLevel.ts#L16)
Level 0 (default)
Minimal reporting:
- minimal failing case
- error log corresponding to the minimal failing case
##### Remarks
Since 1.9.1
***
#### Verbose {#verbose}
> **Verbose**: `1`
Defined in: [packages/fast-check/src/check/runner/configuration/VerbosityLevel.ts:26](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/VerbosityLevel.ts#L26)
Level 1
Failures reporting:
- same as `VerbosityLevel.None`
- list all the failures encountered during the shrinking process
##### Remarks
Since 1.9.1
***
#### VeryVerbose {#veryverbose}
> **VeryVerbose**: `2`
Defined in: [packages/fast-check/src/check/runner/configuration/VerbosityLevel.ts:36](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/VerbosityLevel.ts#L36)
Level 2
Execution flow reporting:
- same as `VerbosityLevel.None`
- all runs with their associated status displayed as a tree
##### Remarks
Since 1.9.1
---
## Function: afterEach()
> **afterEach**(`fn`): [`Plugin`](../type-aliases/Plugin.md)\<`unknown`\>
Defined in: [packages/fast-check/src/check/plugin/LifeCyclePlugins.ts:234](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/LifeCyclePlugins.ts#L234)
Register a callback to be called after each run of your predicate.
If the function returns a promise, we wait until the promise resolves before running anything else.
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `fn` | `AfterEachHook` | Hook to be executed after each execution of the predicate |
### Returns
[`Plugin`](../type-aliases/Plugin.md)\<`unknown`\>
### Example
```ts
fc.assert(
fc.property(..., (...) => {...}),
{ plugins: [fc.afterEach(() => {...})] }
)
```
### Remarks
Since 4.10.0
---
## Function: anything()
### Call Signature
> **anything**(): [`Arbitrary`](../classes/Arbitrary.md)\<`unknown`\>
Defined in: [packages/fast-check/src/arbitrary/anything.ts:21](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/anything.ts#L21)
For any type of values
You may use [sample](sample.md) to preview the values that will be generated
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`unknown`\>
#### Example
```javascript
null, undefined, 42, 6.5, 'Hello', {}, {k: [{}, 1, 2]}
```
#### Remarks
Since 0.0.7
### Call Signature
> **anything**(`constraints`): [`Arbitrary`](../classes/Arbitrary.md)\<`unknown`\>
Defined in: [packages/fast-check/src/arbitrary/anything.ts:52](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/anything.ts#L52)
For any type of values following the constraints defined by `settings`
You may use [sample](sample.md) to preview the values that will be generated
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`ObjectConstraints`](../interfaces/ObjectConstraints.md) | Constraints to apply when building instances |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`unknown`\>
#### Examples
```javascript
null, undefined, 42, 6.5, 'Hello', {}, {k: [{}, 1, 2]}
```
```typescript
// Using custom settings
fc.anything({
key: fc.string(),
values: [fc.integer(10,20), fc.constant(42)],
maxDepth: 2
});
// Can build entries such as:
// - 19
// - [{"2":12,"k":15,"A":42}]
// - {"4":[19,13,14,14,42,11,20,11],"6":42,"7":16,"L":10,"'":[20,11],"e":[42,20,42,14,13,17]}
// - [42,42,42]...
```
#### Remarks
Since 0.0.7
---
## Function: array()
> **array**\<`T`\>(`arb`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
Defined in: [packages/fast-check/src/arbitrary/array.ts:78](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/array.ts#L78)
For arrays of values coming from `arb`
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | Arbitrary used to generate the values inside the array |
| `constraints` | [`ArrayConstraints`](../interfaces/ArrayConstraints.md) | Constraints to apply when building instances (since 2.4.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
### Remarks
Since 0.0.1
---
## Function: assert()
### Call Signature
> **assert**\<`Ts`\>(`property`, `params?`): `Promise`\<`void`\>
Defined in: [packages/fast-check/src/check/runner/Runner.ts:273](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/Runner.ts#L273)
Run the property, throw in case of failure
It can be called directly from describe/it blocks of Mocha.
No meaningful results are produced in case of success.
WARNING: Has to be awaited
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `property` | [`IAsyncProperty`](../interfaces/IAsyncProperty.md)\<`Ts`\> | Asynchronous property to be checked |
| `params?` | [`Parameters`](../interfaces/Parameters.md)\<`Ts`\> | Optional parameters to customize the execution |
#### Returns
`Promise`\<`void`\>
#### Remarks
Since 0.0.7
### Call Signature
> **assert**\<`Ts`\>(`property`, `params?`): `void`
Defined in: [packages/fast-check/src/check/runner/Runner.ts:286](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/Runner.ts#L286)
Run the property, throw in case of failure
It can be called directly from describe/it blocks of Mocha.
No meaningful results are produced in case of success.
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `property` | [`IProperty`](../interfaces/IProperty.md)\<`Ts`\> | Synchronous property to be checked |
| `params?` | [`Parameters`](../interfaces/Parameters.md)\<`Ts`\> | Optional parameters to customize the execution |
#### Returns
`void`
#### Remarks
Since 0.0.1
### Call Signature
> **assert**\<`Ts`\>(`property`, `params?`): `void` \| `Promise`\<`void`\>
Defined in: [packages/fast-check/src/check/runner/Runner.ts:301](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/Runner.ts#L301)
Run the property, throw in case of failure
It can be called directly from describe/it blocks of Mocha.
No meaningful results are produced in case of success.
WARNING: Returns a promise to be awaited if the property is asynchronous
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `property` | [`IRawProperty`](../interfaces/IRawProperty.md)\<`Ts`\> | Synchronous or asynchronous property to be checked |
| `params?` | [`Parameters`](../interfaces/Parameters.md)\<`Ts`\> | Optional parameters to customize the execution |
#### Returns
`void` \| `Promise`\<`void`\>
#### Remarks
Since 0.0.7
---
## Function: asyncDefaultReportMessage()
### Call Signature
> **asyncDefaultReportMessage**\<`Ts`\>(`out`): `Promise`\<`undefined`\>
Defined in: [packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts:233](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts#L233)
Format output of [check](check.md) using the default error reporting of [assert](assert.md)
Produce a string containing the formated error in case of failed run,
undefined otherwise.
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
#### Parameters
| Parameter | Type |
| ------ | ------ |
| `out` | [`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\> & `object` |
#### Returns
`Promise`\<`undefined`\>
#### Remarks
Since 2.17.0
### Call Signature
> **asyncDefaultReportMessage**\<`Ts`\>(`out`): `Promise`\<`string`\>
Defined in: [packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts:243](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts#L243)
Format output of [check](check.md) using the default error reporting of [assert](assert.md)
Produce a string containing the formated error in case of failed run,
undefined otherwise.
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
#### Parameters
| Parameter | Type |
| ------ | ------ |
| `out` | [`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\> & `object` |
#### Returns
`Promise`\<`string`\>
#### Remarks
Since 2.17.0
### Call Signature
> **asyncDefaultReportMessage**\<`Ts`\>(`out`): `Promise`\<`string` \| `undefined`\>
Defined in: [packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts:253](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts#L253)
Format output of [check](check.md) using the default error reporting of [assert](assert.md)
Produce a string containing the formated error in case of failed run,
undefined otherwise.
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
#### Parameters
| Parameter | Type |
| ------ | ------ |
| `out` | [`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\> |
#### Returns
`Promise`\<`string` \| `undefined`\>
#### Remarks
Since 2.17.0
---
## Function: asyncModelRun()
> **asyncModelRun**\<`Model`, `Real`, `CheckAsync`, `InitialModel`\>(`s`, `cmds`): `Promise`\<`void`\>
Defined in: [packages/fast-check/src/check/model/ModelRunner.ts:131](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/ModelRunner.ts#L131)
Run asynchronous commands over a `Model` and the `Real` system
Throw in case of inconsistency
### Type Parameters
| Type Parameter |
| ------ |
| `Model` *extends* `object` |
| `Real` |
| `CheckAsync` *extends* `boolean` |
| `InitialModel` *extends* `object` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `s` | [`ModelRunSetup`](../type-aliases/ModelRunSetup.md)\<`InitialModel`, `Real`\> \| [`ModelRunAsyncSetup`](../type-aliases/ModelRunAsyncSetup.md)\<`InitialModel`, `Real`\> | Initial state provider |
| `cmds` | `Iterable`\<[`AsyncCommand`](../interfaces/AsyncCommand.md)\<`Model`, `Real`, `CheckAsync`\>\> | Asynchronous commands to be executed |
### Returns
`Promise`\<`void`\>
### Remarks
Since 1.5.0
---
## Function: asyncProperty()
> **asyncProperty**\<`Ts`\>(...`args`): [`IAsyncPropertyWithHooks`](../interfaces/IAsyncPropertyWithHooks.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/property/AsyncProperty.ts:15](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/AsyncProperty.ts#L15)
Instantiate a new fast-check#IAsyncProperty
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` *extends* \[`unknown`, `...unknown[]`\] |
### Parameters
| Parameter | Type |
| ------ | ------ |
| ...`args` | \[...arbitraries: \{ \[K in string \| number \| symbol\]: Arbitrary\ \}\[\], (...`args`) => `Promise`\<`boolean` \| `void`\>\] |
### Returns
[`IAsyncPropertyWithHooks`](../interfaces/IAsyncPropertyWithHooks.md)\<`Ts`\>
### Remarks
Since 0.0.7
---
## Function: asyncStringify()
> **asyncStringify**\<`Ts`\>(`value`): `Promise`\<`string`\>
Defined in: [packages/fast-check/src/utils/stringify.ts:457](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/utils/stringify.ts#L457)
Convert any value to its fast-check string representation
This asynchronous version is also able to dig into the status of Promise
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value` | `Ts` | Value to be converted into a string |
### Returns
`Promise`\<`string`\>
### Remarks
Since 2.17.0
---
## Function: base64String()
> **base64String**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/base64String.ts:50](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/base64String.ts#L50)
For base64 strings
A base64 string will always have a length multiple of 4 (padded with =)
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`StringSharedConstraints`](../interfaces/StringSharedConstraints.md) | Constraints to apply when building instances (since 2.4.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 0.0.1
---
## Function: beforeEach()
> **beforeEach**(`fn`): [`Plugin`](../type-aliases/Plugin.md)\<`unknown`\>
Defined in: [packages/fast-check/src/check/plugin/LifeCyclePlugins.ts:196](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/LifeCyclePlugins.ts#L196)
Register a callback to be called before each run of your predicate.
If the function returns a promise, we wait until the promise resolves before running anything else.
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `fn` | `BeforeEachHook` | Hook to be executed before each execution of the predicate |
### Returns
[`Plugin`](../type-aliases/Plugin.md)\<`unknown`\>
### Example
```ts
fc.assert(
fc.property(..., (...) => {...}),
{ plugins: [fc.beforeEach(() => {...})] }
)
```
### Remarks
Since 4.10.0
---
## Function: bigInt()
### Call Signature
> **bigInt**(): [`Arbitrary`](../classes/Arbitrary.md)\<`bigint`\>
Defined in: [packages/fast-check/src/arbitrary/bigInt.ts:64](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/bigInt.ts#L64)
For bigint
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`bigint`\>
#### Remarks
Since 1.9.0
### Call Signature
> **bigInt**(`min`, `max`): [`Arbitrary`](../classes/Arbitrary.md)\<`bigint`\>
Defined in: [packages/fast-check/src/arbitrary/bigInt.ts:74](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/bigInt.ts#L74)
For bigint between min (included) and max (included)
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `min` | `bigint` | Lower bound for the generated bigints (eg.: -5n, 0n, BigInt(Number.MIN_SAFE_INTEGER)) |
| `max` | `bigint` | Upper bound for the generated bigints (eg.: -2n, 2147483647n, BigInt(Number.MAX_SAFE_INTEGER)) |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`bigint`\>
#### Remarks
Since 1.9.0
### Call Signature
> **bigInt**(`constraints`): [`Arbitrary`](../classes/Arbitrary.md)\<`bigint`\>
Defined in: [packages/fast-check/src/arbitrary/bigInt.ts:83](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/bigInt.ts#L83)
For bigint between min (included) and max (included)
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`BigIntConstraints`](../interfaces/BigIntConstraints.md) | Constraints to apply when building instances |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`bigint`\>
#### Remarks
Since 2.6.0
### Call Signature
> **bigInt**(...`args`): [`Arbitrary`](../classes/Arbitrary.md)\<`bigint`\>
Defined in: [packages/fast-check/src/arbitrary/bigInt.ts:92](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/bigInt.ts#L92)
For bigint between min (included) and max (included)
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| ...`args` | \[\] \| \[`bigint`, `bigint`\] \| \[[`BigIntConstraints`](../interfaces/BigIntConstraints.md)\] | Either min/max bounds as an object or constraints to apply when building instances |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`bigint`\>
#### Remarks
Since 2.6.0
---
## Function: bigInt64Array()
> **bigInt64Array**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`BigInt64Array`\<`ArrayBuffer`\>\>
Defined in: [packages/fast-check/src/arbitrary/bigInt64Array.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/bigInt64Array.ts#L12)
For BigInt64Array
### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints` | [`BigIntArrayConstraints`](../type-aliases/BigIntArrayConstraints.md) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`BigInt64Array`\<`ArrayBuffer`\>\>
### Remarks
Since 3.0.0
---
## Function: bigUint64Array()
> **bigUint64Array**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`BigUint64Array`\<`ArrayBuffer`\>\>
Defined in: [packages/fast-check/src/arbitrary/bigUint64Array.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/bigUint64Array.ts#L12)
For BigUint64Array
### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints` | [`BigIntArrayConstraints`](../type-aliases/BigIntArrayConstraints.md) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`BigUint64Array`\<`ArrayBuffer`\>\>
### Remarks
Since 3.0.0
---
## Function: boolean()
> **boolean**(): [`Arbitrary`](../classes/Arbitrary.md)\<`boolean`\>
Defined in: [packages/fast-check/src/arbitrary/boolean.ts:21](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/boolean.ts#L21)
For boolean values - `true` or `false`
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`boolean`\>
### Remarks
Since 0.0.6
---
## Function: chainUntil()
> **chainUntil**\<`T`\>(`startArb`, `chainer`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/chainUntil.ts:155](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/chainUntil.ts#L155)
Build an arbitrary by iteratively chaining arbitraries until the chainer returns undefined.
Starting from a value produced by `startArb`, the `chainer` function is called with the current value
to produce the next arbitrary. This process repeats until `chainer` returns `undefined`.
The final value in the chain is the one produced by this arbitrary.
The implementation is fully iterative (non-recursive) and supports shrinking.
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `startArb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | The starting arbitrary producing the initial value |
| `chainer` | (`prev`) => [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> \| `undefined` | A function called with the current value that returns either the next arbitrary to generate from or undefined to stop the chain |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
An arbitrary producing the last value in the chain
### Remarks
Since 4.8.0
---
## Function: check()
### Call Signature
> **check**\<`Ts`\>(`property`, `params?`): `Promise`\<[`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\>\>
Defined in: [packages/fast-check/src/check/runner/Runner.ts:163](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/Runner.ts#L163)
Run the property, do not throw contrary to [assert](assert.md)
WARNING: Has to be awaited
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `property` | [`IAsyncProperty`](../interfaces/IAsyncProperty.md)\<`Ts`\> | Asynchronous property to be checked |
| `params?` | [`Parameters`](../interfaces/Parameters.md)\<`Ts`\> | Optional parameters to customize the execution |
#### Returns
`Promise`\<[`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\>\>
Test status and other useful details
#### Remarks
Since 0.0.7
### Call Signature
> **check**\<`Ts`\>(`property`, `params?`): [`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/runner/Runner.ts:175](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/Runner.ts#L175)
Run the property, do not throw contrary to [assert](assert.md)
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `property` | [`IProperty`](../interfaces/IProperty.md)\<`Ts`\> | Synchronous property to be checked |
| `params?` | [`Parameters`](../interfaces/Parameters.md)\<`Ts`\> | Optional parameters to customize the execution |
#### Returns
[`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\>
Test status and other useful details
#### Remarks
Since 0.0.1
### Call Signature
> **check**\<`Ts`\>(`property`, `params?`): [`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\> \| `Promise`\<[`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\>\>
Defined in: [packages/fast-check/src/check/runner/Runner.ts:189](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/Runner.ts#L189)
Run the property, do not throw contrary to [assert](assert.md)
WARNING: Has to be awaited if the property is asynchronous
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `property` | [`IRawProperty`](../interfaces/IRawProperty.md)\<`Ts`\> | Property to be checked |
| `params?` | [`Parameters`](../interfaces/Parameters.md)\<`Ts`\> | Optional parameters to customize the execution |
#### Returns
[`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\> \| `Promise`\<[`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\>\>
Test status and other useful details
#### Remarks
Since 0.0.7
---
## Function: clone()
> **clone**\<`T`, `N`\>(`arb`, `numValues`): [`Arbitrary`](../classes/Arbitrary.md)\<[`CloneValue`](../type-aliases/CloneValue.md)\<`T`, `N`, \[\]\>\>
Defined in: [packages/fast-check/src/arbitrary/clone.ts:24](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/clone.ts#L24)
Clone the values generated by `arb` in order to produce fully equal values (might not be equal in terms of === or ==)
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
| `N` *extends* `number` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | Source arbitrary |
| `numValues` | `N` | Number of values to produce |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<[`CloneValue`](../type-aliases/CloneValue.md)\<`T`, `N`, \[\]\>\>
### Remarks
Since 2.5.0
---
## Function: cloneIfNeeded()
> **cloneIfNeeded**\<`T`\>(`instance`): `T`
Defined in: [packages/fast-check/src/check/symbols.ts:48](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/symbols.ts#L48)
Clone an instance if needed
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type |
| ------ | ------ |
| `instance` | `T` |
### Returns
`T`
### Remarks
Since 2.15.0
---
## Function: commands()
### Call Signature
> **commands**\<`Model`, `Real`, `CheckAsync`\>(`commandArbs`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Iterable`\<[`AsyncCommand`](../interfaces/AsyncCommand.md)\<`Model`, `Real`, `CheckAsync`\>, `any`, `any`\>\>
Defined in: [packages/fast-check/src/arbitrary/commands.ts:24](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/commands.ts#L24)
For arrays of [AsyncCommand](../interfaces/AsyncCommand.md) to be executed by [asyncModelRun](asyncModelRun.md)
This implementation comes with a shrinker adapted for commands.
It should shrink more efficiently than [array](array.md) for [AsyncCommand](../interfaces/AsyncCommand.md) arrays.
#### Type Parameters
| Type Parameter |
| ------ |
| `Model` *extends* `object` |
| `Real` |
| `CheckAsync` *extends* `boolean` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `commandArbs` | [`Arbitrary`](../classes/Arbitrary.md)\<[`AsyncCommand`](../interfaces/AsyncCommand.md)\<`Model`, `Real`, `CheckAsync`\>\>[] | Arbitraries responsible to build commands |
| `constraints?` | [`CommandsContraints`](../interfaces/CommandsContraints.md) | Constraints to be applied when generating the commands (since 1.11.0) |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Iterable`\<[`AsyncCommand`](../interfaces/AsyncCommand.md)\<`Model`, `Real`, `CheckAsync`\>, `any`, `any`\>\>
#### Remarks
Since 1.5.0
### Call Signature
> **commands**\<`Model`, `Real`\>(`commandArbs`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Iterable`\<[`Command`](../interfaces/Command.md)\<`Model`, `Real`\>, `any`, `any`\>\>
Defined in: [packages/fast-check/src/arbitrary/commands.ts:40](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/commands.ts#L40)
For arrays of [Command](../interfaces/Command.md) to be executed by [modelRun](modelRun.md)
This implementation comes with a shrinker adapted for commands.
It should shrink more efficiently than [array](array.md) for [Command](../interfaces/Command.md) arrays.
#### Type Parameters
| Type Parameter |
| ------ |
| `Model` *extends* `object` |
| `Real` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `commandArbs` | [`Arbitrary`](../classes/Arbitrary.md)\<[`Command`](../interfaces/Command.md)\<`Model`, `Real`\>\>[] | Arbitraries responsible to build commands |
| `constraints?` | [`CommandsContraints`](../interfaces/CommandsContraints.md) | Constraints to be applied when generating the commands (since 1.11.0) |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Iterable`\<[`Command`](../interfaces/Command.md)\<`Model`, `Real`\>, `any`, `any`\>\>
#### Remarks
Since 1.5.0
---
## Function: compareBooleanFunc()
> **compareBooleanFunc**\<`T`\>(): [`Arbitrary`](../classes/Arbitrary.md)\<(`a`, `b`) => `boolean`\>
Defined in: [packages/fast-check/src/arbitrary/compareBooleanFunc.ts:16](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/compareBooleanFunc.ts#L16)
For comparison boolean functions
A comparison boolean function returns:
- `true` whenever `a < b`
- `false` otherwise (ie. `a = b` or `a > b`)
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<(`a`, `b`) => `boolean`\>
### Remarks
Since 1.6.0
---
## Function: compareFunc()
> **compareFunc**\<`T`\>(): [`Arbitrary`](../classes/Arbitrary.md)\<(`a`, `b`) => `number`\>
Defined in: [packages/fast-check/src/arbitrary/compareFunc.ts:21](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/compareFunc.ts#L21)
For comparison functions
A comparison function returns:
- negative value whenever `a < b`
- positive value whenever `a > b`
- zero whenever `a` and `b` are equivalent
Comparison functions are transitive: `a < b and b < c => a < c`
They also satisfy: `a < b <=> b > a` and `a = b <=> b = a`
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<(`a`, `b`) => `number`\>
### Remarks
Since 1.6.0
---
## Function: configureGlobal()
> **configureGlobal**(`parameters`): `void`
Defined in: [packages/fast-check/src/check/runner/configuration/GlobalParameters.ts:118](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/GlobalParameters.ts#L118)
Define global parameters that will be used by all the runners
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `parameters` | [`GlobalParameters`](../type-aliases/GlobalParameters.md) | Global parameters |
### Returns
`void`
### Example
```typescript
fc.configureGlobal({ numRuns: 10 });
//...
fc.assert(
fc.property(
fc.nat(), fc.nat(),
(a, b) => a + b === b + a
), { seed: 42 }
) // equivalent to { numRuns: 10, seed: 42 }
```
### Remarks
Since 1.18.0
---
## Function: constant()
> **constant**\<`T`\>(`value`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/constant.ts:10](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/constant.ts#L10)
For `value`
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value` | `T` | The value to produce |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
### Remarks
Since 0.0.1
---
## Function: constantFrom()
### Call Signature
> **constantFrom**\<`T`\>(...`values`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/constantFrom.ts:19](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/constantFrom.ts#L19)
For one `...values` values - all equiprobable
**WARNING**: It expects at least one value, otherwise it should throw
#### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `T` | `never` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| ...`values` | `T`[] | Constant values to be produced (all values shrink to the first one) |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
#### Remarks
Since 0.0.12
### Call Signature
> **constantFrom**\<`TArgs`\>(...`values`): [`Arbitrary`](../classes/Arbitrary.md)\<`TArgs`\[`number`\]\>
Defined in: [packages/fast-check/src/arbitrary/constantFrom.ts:31](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/constantFrom.ts#L31)
For one `...values` values - all equiprobable
**WARNING**: It expects at least one value, otherwise it should throw
#### Type Parameters
| Type Parameter |
| ------ |
| `TArgs` *extends* `any`[] \| \[`any`\] |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| ...`values` | `TArgs` | Constant values to be produced (all values shrink to the first one) |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`TArgs`\[`number`\]\>
#### Remarks
Since 0.0.12
---
## Function: context()
> **context**(): [`Arbitrary`](../classes/Arbitrary.md)\<[`ContextValue`](../interfaces/ContextValue.md)\>
Defined in: [packages/fast-check/src/arbitrary/context.ts:50](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/context.ts#L50)
Produce a [ContextValue](../interfaces/ContextValue.md) instance
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<[`ContextValue`](../interfaces/ContextValue.md)\>
### Remarks
Since 1.8.0
---
## Function: createDepthIdentifier()
> **createDepthIdentifier**(): [`DepthIdentifier`](../type-aliases/DepthIdentifier.md)
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/DepthContext.ts:73](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/DepthContext.ts#L73)
Create a new and unique instance of DepthIdentifier
that can be shared across multiple arbitraries if needed
### Returns
[`DepthIdentifier`](../type-aliases/DepthIdentifier.md)
---
## Function: date()
> **date**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Date`\>
Defined in: [packages/fast-check/src/arbitrary/date.ts:47](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/date.ts#L47)
For date between constraints.min or new Date(-8640000000000000) (included) and constraints.max or new Date(8640000000000000) (included)
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`DateConstraints`](../interfaces/DateConstraints.md) | Constraints to apply when building instances |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Date`\>
### Remarks
Since 1.17.0
---
## Function: defaultReportMessage()
### Call Signature
> **defaultReportMessage**\<`Ts`\>(`out`): `undefined`
Defined in: [packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts:199](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts#L199)
Format output of [check](check.md) using the default error reporting of [assert](assert.md)
Produce a string containing the formated error in case of failed run,
undefined otherwise.
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
#### Parameters
| Parameter | Type |
| ------ | ------ |
| `out` | [`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\> & `object` |
#### Returns
`undefined`
#### Remarks
Since 1.25.0
### Call Signature
> **defaultReportMessage**\<`Ts`\>(`out`): `string`
Defined in: [packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts:209](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts#L209)
Format output of [check](check.md) using the default error reporting of [assert](assert.md)
Produce a string containing the formated error in case of failed run,
undefined otherwise.
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
#### Parameters
| Parameter | Type |
| ------ | ------ |
| `out` | [`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\> & `object` |
#### Returns
`string`
#### Remarks
Since 1.25.0
### Call Signature
> **defaultReportMessage**\<`Ts`\>(`out`): `string` \| `undefined`
Defined in: [packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts:219](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/utils/RunDetailsFormatter.ts#L219)
Format output of [check](check.md) using the default error reporting of [assert](assert.md)
Produce a string containing the formated error in case of failed run,
undefined otherwise.
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
#### Parameters
| Parameter | Type |
| ------ | ------ |
| `out` | [`RunDetails`](../type-aliases/RunDetails.md)\<`Ts`\> |
#### Returns
`string` \| `undefined`
#### Remarks
Since 1.25.0
---
## Function: dictionary()
### Call Signature
> **dictionary**\<`T`\>(`keyArb`, `valueArb`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Record`\<`string`, `T`\>\>
Defined in: [packages/fast-check/src/arbitrary/dictionary.ts:67](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/dictionary.ts#L67)
For dictionaries with keys produced by `keyArb` and values from `valueArb`
#### Type Parameters
| Type Parameter |
| ------ |
| `T` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `keyArb` | [`Arbitrary`](../classes/Arbitrary.md)\<`string`\> | Arbitrary used to generate the keys of the object |
| `valueArb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | Arbitrary used to generate the values of the object |
| `constraints?` | [`DictionaryConstraints`](../interfaces/DictionaryConstraints.md) | - |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Record`\<`string`, `T`\>\>
#### Remarks
Since 1.0.0
### Call Signature
> **dictionary**\<`K`, `V`\>(`keyArb`, `valueArb`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Record`\<`K`, `V`\>\>
Defined in: [packages/fast-check/src/arbitrary/dictionary.ts:81](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/dictionary.ts#L81)
For dictionaries with keys produced by `keyArb` and values from `valueArb`
#### Type Parameters
| Type Parameter |
| ------ |
| `K` *extends* `PropertyKey` |
| `V` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `keyArb` | [`Arbitrary`](../classes/Arbitrary.md)\<`K`\> | Arbitrary used to generate the keys of the object |
| `valueArb` | [`Arbitrary`](../classes/Arbitrary.md)\<`V`\> | Arbitrary used to generate the values of the object |
| `constraints?` | [`DictionaryConstraints`](../interfaces/DictionaryConstraints.md) | - |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Record`\<`K`, `V`\>\>
#### Remarks
Since 4.4.0
---
## Function: domain()
> **domain**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/domain.ts:115](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/domain.ts#L115)
For domains
having an extension with at least two lowercase characters
According to [RFC 1034](https://www.ietf.org/rfc/rfc1034.txt),
[RFC 1035](https://www.ietf.org/rfc/rfc1035.txt),
[RFC 1123](https://www.ietf.org/rfc/rfc1123.txt) and
[WHATWG URL Standard](https://url.spec.whatwg.org/)
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`DomainConstraints`](../interfaces/DomainConstraints.md) | Constraints to apply when building instances (since 2.22.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 1.14.0
---
## Function: double()
> **double**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
Defined in: [packages/fast-check/src/arbitrary/double.ts:152](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/double.ts#L152)
For 64-bit floating point numbers:
- sign: 1 bit
- significand: 52 bits
- exponent: 11 bits
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`DoubleConstraints`](../interfaces/DoubleConstraints.md) | Constraints to apply when building instances (since 2.8.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
### Remarks
Since 0.0.6
---
## Function: emailAddress()
> **emailAddress**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/emailAddress.ts:73](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/emailAddress.ts#L73)
For email address
According to [RFC 2821](https://www.ietf.org/rfc/rfc2821.txt),
[RFC 3696](https://www.ietf.org/rfc/rfc3696.txt) and
[RFC 5322](https://www.ietf.org/rfc/rfc5322.txt)
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`EmailAddressConstraints`](../interfaces/EmailAddressConstraints.md) | Constraints to apply when building instances (since 2.22.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 1.14.0
---
## Function: entityGraph()
> **entityGraph**\<`TEntityFields`, `TEntityRelations`\>(`arbitraries`, `relations`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<[`EntityGraphValue`](../type-aliases/EntityGraphValue.md)\<`TEntityFields`, `TEntityRelations`\>\>
Defined in: [packages/fast-check/src/arbitrary/entityGraph.ts:120](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/entityGraph.ts#L120)
Generates interconnected entities with relationships based on a schema definition.
This arbitrary creates structured data where entities can reference each other through defined
relationships. The generated values automatically include links between entities, making it
ideal for testing graph structures, relational data, or interconnected object models.
The output is an object where each key corresponds to an entity type and the value is an array
of entities of that type. Entities contain both their data fields and relationship links.
### Type Parameters
| Type Parameter |
| ------ |
| `TEntityFields` |
| `TEntityRelations` *extends* [`EntityGraphRelations`](../type-aliases/EntityGraphRelations.md)\<`TEntityFields`\> |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arbitraries` | [`EntityGraphArbitraries`](../type-aliases/EntityGraphArbitraries.md)\<`TEntityFields`\> | Defines the data fields for each entity type (non-relational properties) |
| `relations` | `TEntityRelations` | Defines how entities reference each other (relational properties) |
| `constraints` | [`EntityGraphConstraints`](../type-aliases/EntityGraphConstraints.md)\<`TEntityFields`\> | Optional configuration to customize generation behavior |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<[`EntityGraphValue`](../type-aliases/EntityGraphValue.md)\<`TEntityFields`, `TEntityRelations`\>\>
### Examples
```typescript
// Generate a simple directed graph where nodes link to other nodes
fc.entityGraph(
{ node: { id: fc.stringMatching(/^[A-Z][a-z]*$/) } },
{ node: { linkTo: { arity: 'many', type: 'node' } } },
)
// Produces: { node: [{ id: "Abc", linkTo: [, ] }, ...] }
```
```typescript
// Generate employees with managers and teams
fc.entityGraph(
{
employee: { name: fc.string() },
team: { name: fc.string() }
},
{
employee: {
manager: { arity: '0-1', type: 'employee' }, // Optional manager
team: { arity: '1', type: 'team' } // Required team
},
team: {}
}
)
```
### Remarks
Since 4.5.0
---
## Function: falsy()
> **falsy**\<`TConstraints`\>(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<[`FalsyValue`](../type-aliases/FalsyValue.md)\<`TConstraints`\>\>
Defined in: [packages/fast-check/src/arbitrary/falsy.ts:41](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/falsy.ts#L41)
For falsy values:
- ''
- 0
- NaN
- false
- null
- undefined
- 0n (whenever withBigInt: true)
### Type Parameters
| Type Parameter |
| ------ |
| `TConstraints` *extends* [`FalsyContraints`](../interfaces/FalsyContraints.md) |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints?` | `TConstraints` | Constraints to apply when building instances |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<[`FalsyValue`](../type-aliases/FalsyValue.md)\<`TConstraints`\>\>
### Remarks
Since 1.26.0
---
## Function: float()
> **float**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
Defined in: [packages/fast-check/src/arbitrary/float.ts:154](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/float.ts#L154)
For 32-bit floating point numbers:
- sign: 1 bit
- significand: 23 bits
- exponent: 8 bits
The smallest non-zero value (in absolute value) that can be represented by such float is: 2 ** -126 * 2 ** -23.
And the largest one is: 2 ** 127 * (1 + (2 ** 23 - 1) / 2 ** 23).
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`FloatConstraints`](../interfaces/FloatConstraints.md) | Constraints to apply when building instances (since 2.8.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
### Remarks
Since 0.0.6
---
## Function: float32Array()
> **float32Array**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Float32Array`\<`ArrayBuffer`\>\>
Defined in: [packages/fast-check/src/arbitrary/float32Array.ts:49](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/float32Array.ts#L49)
For Float32Array
### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints` | [`Float32ArrayConstraints`](../type-aliases/Float32ArrayConstraints.md) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Float32Array`\<`ArrayBuffer`\>\>
### Remarks
Since 2.9.0
---
## Function: float64Array()
> **float64Array**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Float64Array`\<`ArrayBuffer`\>\>
Defined in: [packages/fast-check/src/arbitrary/float64Array.ts:49](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/float64Array.ts#L49)
For Float64Array
### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints` | [`Float64ArrayConstraints`](../type-aliases/Float64ArrayConstraints.md) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Float64Array`\<`ArrayBuffer`\>\>
### Remarks
Since 2.9.0
---
## Function: func()
> **func**\<`TArgs`, `TOut`\>(`arb`): [`Arbitrary`](../classes/Arbitrary.md)\<(...`args`) => `TOut`\>
Defined in: [packages/fast-check/src/arbitrary/func.ts:23](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/func.ts#L23)
For pure functions
### Type Parameters
| Type Parameter |
| ------ |
| `TArgs` *extends* `any`[] |
| `TOut` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arb` | [`Arbitrary`](../classes/Arbitrary.md)\<`TOut`\> | Arbitrary responsible to produce the values |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<(...`args`) => `TOut`\>
### Remarks
Since 1.6.0
---
## Function: gen()
> **gen**(): [`Arbitrary`](../classes/Arbitrary.md)\<[`GeneratorValue`](../type-aliases/GeneratorValue.md)\>
Defined in: [packages/fast-check/src/arbitrary/gen.ts:40](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/gen.ts#L40)
Generate values within the test execution itself by leveraging the strength of `gen`
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<[`GeneratorValue`](../type-aliases/GeneratorValue.md)\>
### Example
```javascript
fc.assert(
fc.property(fc.gen(), gen => {
const size = gen(fc.nat, {max: 10});
const array = [];
for (let index = 0 ; index !== size ; ++index) {
array.push(gen(fc.integer));
}
// Here is an array!
// Note: Prefer fc.array(fc.integer(), {maxLength: 10}) if you want to produce such array
})
)
```
⚠️ WARNING:
While `gen` is easy to use, it may not shrink as well as tailored arbitraries based on `filter` or `map`.
⚠️ WARNING:
Additionally it cannot run back the test properly when attempting to replay based on a seed and a path.
You'll need to limit yourself to the seed and drop the path from the options if you attempt to replay something
implying it. More precisely, you may keep the very first part of the path but have to drop anything after the
first ":".
⚠️ WARNING:
It also does not support custom examples.
### Remarks
Since 3.8.0
---
## Function: getDepthContextFor()
> **getDepthContextFor**(`contextMeta`): [`DepthContext`](../type-aliases/DepthContext.md)
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/DepthContext.ts:52](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/DepthContext.ts#L52)
Get back the requested DepthContext
### Parameters
| Parameter | Type |
| ------ | ------ |
| `contextMeta` | `string` \| [`DepthContext`](../type-aliases/DepthContext.md) \| [`DepthIdentifier`](../type-aliases/DepthIdentifier.md) \| `undefined` |
### Returns
[`DepthContext`](../type-aliases/DepthContext.md)
### Remarks
Since 2.25.0
---
## Function: hasAsyncToStringMethod()
> **hasAsyncToStringMethod**\<`T`\>(`instance`): `instance is T & WithAsyncToStringMethod`
Defined in: [packages/fast-check/src/utils/stringify.ts:81](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/utils/stringify.ts#L81)
Check if an instance implements [WithAsyncToStringMethod](../type-aliases/WithAsyncToStringMethod.md)
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type |
| ------ | ------ |
| `instance` | `T` |
### Returns
`instance is T & WithAsyncToStringMethod`
### Remarks
Since 2.17.0
---
## Function: hasCloneMethod()
> **hasCloneMethod**\<`T`\>(`instance`): `instance is WithCloneMethod`
Defined in: [packages/fast-check/src/check/symbols.ts:30](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/symbols.ts#L30)
Check if an instance has to be clone
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type |
| ------ | ------ |
| `instance` | `T` \| [`WithCloneMethod`](../interfaces/WithCloneMethod.md)\<`T`\> |
### Returns
`instance is WithCloneMethod`
### Remarks
Since 2.15.0
---
## Function: hasToStringMethod()
> **hasToStringMethod**\<`T`\>(`instance`): `instance is T & WithToStringMethod`
Defined in: [packages/fast-check/src/utils/stringify.ts:47](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/utils/stringify.ts#L47)
Check if an instance implements [WithToStringMethod](../type-aliases/WithToStringMethod.md)
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type |
| ------ | ------ |
| `instance` | `T` |
### Returns
`instance is T & WithToStringMethod`
### Remarks
Since 2.17.0
---
## Function: hash()
> **hash**(`repr`): `number`
Defined in: [packages/fast-check/src/utils/hash.ts:46](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/utils/hash.ts#L46)
CRC-32 based hash function
Used internally by fast-check in [func](func.md), [compareFunc](compareFunc.md) or even [compareBooleanFunc](compareBooleanFunc.md).
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `repr` | `string` | String value to be hashed |
### Returns
`number`
### Remarks
Since 2.1.0
---
## Function: infiniteStream()
> **infiniteStream**\<`T`\>(`arb`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<[`Stream`](../classes/Stream.md)\<`T`\>\>
Defined in: [packages/fast-check/src/arbitrary/infiniteStream.ts:35](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/infiniteStream.ts#L35)
Produce an infinite stream of values
WARNING: By default, infiniteStream remembers all values it has ever
generated. This causes unbounded memory growth during large tests.
Set noHistory to disable.
WARNING: Requires Object.assign
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | Arbitrary used to generate the values |
| `constraints?` | `InfiniteStreamConstraints` | Constraints to apply when building instances (since 4.3.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<[`Stream`](../classes/Stream.md)\<`T`\>\>
### Remarks
Since 1.8.0
---
## Function: installGlobalPlugin()
> **installGlobalPlugin**(`plugin`): `void`
Defined in: [packages/fast-check/src/check/runner/configuration/GlobalPlugins.ts:26](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/GlobalPlugins.ts#L26)
Install a plugin to be used by all the runners
Installed plugins come before the ones passed via the `plugins` option of the run.
In other words, they are the outermost ones: they are entered first when running the predicate.
Think of: `outer(inner(predicate))`.
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `plugin` | [`Plugin`](../type-aliases/Plugin.md)\<`unknown`\> | Plugin to be installed globally |
### Returns
`void`
### Example
```typescript
fc.installGlobalPlugin(myPlugin());
//...
fc.assert(myProp, { plugins: [myOtherPlugin()] })
// equivalent to { plugins: [myPlugin(), myOtherPlugin()] }
// myPlugin will wrap myOtherPlugin, itself wrapping the default behavior
```
### Remarks
Since 4.10.0
---
## Function: int16Array()
> **int16Array**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Int16Array`\<`ArrayBuffer`\>\>
Defined in: [packages/fast-check/src/arbitrary/int16Array.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/int16Array.ts#L12)
For Int16Array
### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints` | [`IntArrayConstraints`](../type-aliases/IntArrayConstraints.md) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Int16Array`\<`ArrayBuffer`\>\>
### Remarks
Since 2.9.0
---
## Function: int32Array()
> **int32Array**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Int32Array`\<`ArrayBuffer`\>\>
Defined in: [packages/fast-check/src/arbitrary/int32Array.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/int32Array.ts#L12)
For Int32Array
### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints` | [`IntArrayConstraints`](../type-aliases/IntArrayConstraints.md) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Int32Array`\<`ArrayBuffer`\>\>
### Remarks
Since 2.9.0
---
## Function: int8Array()
> **int8Array**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Int8Array`\<`ArrayBuffer`\>\>
Defined in: [packages/fast-check/src/arbitrary/int8Array.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/int8Array.ts#L12)
For Int8Array
### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints` | [`IntArrayConstraints`](../type-aliases/IntArrayConstraints.md) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Int8Array`\<`ArrayBuffer`\>\>
### Remarks
Since 2.9.0
---
## Function: integer()
> **integer**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
Defined in: [packages/fast-check/src/arbitrary/integer.ts:44](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/integer.ts#L44)
For integers between min (included) and max (included)
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`IntegerConstraints`](../interfaces/IntegerConstraints.md) | Constraints to apply when building instances (since 2.6.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
### Remarks
Since 0.0.1
---
## Function: interruptAfterTimeLimit()
> **interruptAfterTimeLimit**(`timeLimitMs`, `options?`): [`Plugin`](../type-aliases/Plugin.md)\<`unknown`\>
Defined in: [packages/fast-check/src/check/plugin/InterruptAfterTimeLimitPlugin.ts:84](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/InterruptAfterTimeLimitPlugin.ts#L84)
Interrupt test execution after a given time limit.
NOTE: Useful to avoid having too long running processes in your CI while preserving replay capabilities if needed.
WARNING: A test interrupted before any failure counts as a success, even if it did not
reach `numRuns` runs, unless `failOnInterrupt` is set to `true`.
As predicates cannot be stopped, the underlying execution keeps running but its outcome gets ignored.
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `timeLimitMs` | `number` | Delay in milliseconds after which runs gets interrupted |
| `options` | [`InterruptAfterTimeLimitOptions`](../type-aliases/InterruptAfterTimeLimitOptions.md) | - |
### Returns
[`Plugin`](../type-aliases/Plugin.md)\<`unknown`\>
### Example
```ts
fc.assert(
fc.asyncProperty(..., async (...) => {...}),
{ plugins: [fc.interruptAfterTimeLimit(1000)] }
)
```
### Remarks
Since 4.10.0
---
## Function: ipV4()
> **ipV4**(): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/ipV4.ts:28](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/ipV4.ts#L28)
For valid IP v4
Following [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3.2.2)
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 1.14.0
---
## Function: ipV4Extended()
> **ipV4Extended**(): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/ipV4Extended.ts:30](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/ipV4Extended.ts#L30)
For valid IP v4 according to WhatWG
Following [WhatWG](https://url.spec.whatwg.org/), the specification for web-browsers
There is no equivalent for IP v6 according to the [IP v6 parser](https://url.spec.whatwg.org/#concept-ipv6-parser)
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 1.17.0
---
## Function: ipV6()
> **ipV6**(): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/ipV6.ts:72](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/ipV6.ts#L72)
For valid IP v6
Following [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3.2.2)
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 1.14.0
---
## Function: json()
> **json**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/json.ts:32](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/json.ts#L32)
For any JSON strings
Keys and string values rely on [string](string.md)
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`JsonSharedConstraints`](../interfaces/JsonSharedConstraints.md) | Constraints to be applied onto the generated instance (since 2.5.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 0.0.7
---
## Function: jsonValue()
> **jsonValue**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<[`JsonValue`](../type-aliases/JsonValue.md)\>
Defined in: [packages/fast-check/src/arbitrary/jsonValue.ts:22](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/jsonValue.ts#L22)
For any JSON compliant values
Keys and string values rely on [string](string.md)
As `JSON.parse` preserves `-0`, `jsonValue` can also have `-0` as a value.
`jsonValue` must be seen as: any value that could have been built by doing a `JSON.parse` on a given string.
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`JsonSharedConstraints`](../interfaces/JsonSharedConstraints.md) | Constraints to be applied onto the generated instance |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<[`JsonValue`](../type-aliases/JsonValue.md)\>
### Remarks
Since 2.20.0
---
## Function: letrec()
### Call Signature
> **letrec**\<`T`\>(`builder`): [`LetrecValue`](../type-aliases/LetrecValue.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/letrec.ts:90](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/letrec.ts#L90)
For mutually recursive types
#### Type Parameters
| Type Parameter |
| ------ |
| `T` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `builder` | `T` *extends* `Record`\<`string`, `unknown`\> ? [`LetrecTypedBuilder`](../type-aliases/LetrecTypedBuilder.md)\<`T`\> : `never` | Arbitraries builder based on themselves (through `tie`) |
#### Returns
[`LetrecValue`](../type-aliases/LetrecValue.md)\<`T`\>
#### Example
```typescript
type Leaf = number;
type Node = [Tree, Tree];
type Tree = Node | Leaf;
const { tree } = fc.letrec<{ tree: Tree, node: Node, leaf: Leaf }>(tie => ({
tree: fc.oneof({depthSize: 'small'}, tie('leaf'), tie('node')),
node: fc.tuple(tie('tree'), tie('tree')),
leaf: fc.nat()
}));
// tree is 50% of node, 50% of leaf
// the ratio goes in favor of leaves as we go deeper in the tree (thanks to depthSize)
```
#### Remarks
Since 1.16.0
### Call Signature
> **letrec**\<`T`\>(`builder`): [`LetrecValue`](../type-aliases/LetrecValue.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/letrec.ts:110](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/letrec.ts#L110)
For mutually recursive types
#### Type Parameters
| Type Parameter |
| ------ |
| `T` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `builder` | [`LetrecLooselyTypedBuilder`](../type-aliases/LetrecLooselyTypedBuilder.md)\<`T`\> | Arbitraries builder based on themselves (through `tie`) |
#### Returns
[`LetrecValue`](../type-aliases/LetrecValue.md)\<`T`\>
#### Example
```typescript
const { tree } = fc.letrec(tie => ({
tree: fc.oneof({depthSize: 'small'}, tie('leaf'), tie('node')),
node: fc.tuple(tie('tree'), tie('tree')),
leaf: fc.nat()
}));
// tree is 50% of node, 50% of leaf
// the ratio goes in favor of leaves as we go deeper in the tree (thanks to depthSize)
```
#### Remarks
Since 1.16.0
---
## Function: limitShrink()
> **limitShrink**\<`T`\>(`arbitrary`, `maxShrinks`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/limitShrink.ts:24](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/limitShrink.ts#L24)
Create another Arbitrary with a limited (or capped) number of shrink values
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arbitrary` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | Instance of arbitrary responsible to generate and shrink values |
| `maxShrinks` | `number` | Maximal number of shrunk values that can be pulled from the resulting arbitrary |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
Create another arbitrary with limited number of shrink values
### Example
```typescript
const dataGenerator: Arbitrary = ...;
const limitedShrinkableDataGenerator: Arbitrary = fc.limitShrink(dataGenerator, 10);
// up to 10 shrunk values could be extracted from the resulting arbitrary
```
NOTE: Although limiting the shrinking capabilities can speed up your CI when failures occur, we do not recommend this approach.
Instead, if you want to reduce the shrinking time for automated jobs or local runs, consider using `endOnFailure` or `interruptAfterTimeLimit`.
### Remarks
Since 3.20.0
---
## Function: lorem()
> **lorem**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/lorem.ts:238](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/lorem.ts#L238)
For lorem ipsum string of words or sentences with maximal number of words or sentences
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`LoremConstraints`](../interfaces/LoremConstraints.md) | Constraints to be applied onto the generated value (since 2.5.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 0.0.1
---
## Function: map()
> **map**\<`K`, `V`\>(`keyArb`, `valueArb`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Map`\<`K`, `V`\>\>
Defined in: [packages/fast-check/src/arbitrary/map.ts:57](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/map.ts#L57)
For Maps with keys produced by `keyArb` and values from `valueArb`
### Type Parameters
| Type Parameter |
| ------ |
| `K` |
| `V` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `keyArb` | [`Arbitrary`](../classes/Arbitrary.md)\<`K`\> | Arbitrary used to generate the keys of the Map |
| `valueArb` | [`Arbitrary`](../classes/Arbitrary.md)\<`V`\> | Arbitrary used to generate the values of the Map |
| `constraints` | [`MapConstraints`](../interfaces/MapConstraints.md) | Constraints to apply when building instances |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Map`\<`K`, `V`\>\>
### Remarks
Since 4.4.0
---
## Function: mapToConstant()
> **mapToConstant**\<`T`\>(...`entries`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/mapToConstant.ts:40](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/mapToConstant.ts#L40)
Generate non-contiguous ranges of values
by mapping integer values to constant
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type |
| ------ | ------ |
| ...`entries` | `object`[] |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
### Example
```
// generate alphanumeric values (a-z0-9)
mapToConstant(
{ num: 26, build: v => String.fromCharCode(v + 0x61) },
{ num: 10, build: v => String.fromCharCode(v + 0x30) },
)
```
### Remarks
Since 1.14.0
---
## Function: maxSafeInteger()
> **maxSafeInteger**(): [`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
Defined in: [packages/fast-check/src/arbitrary/maxSafeInteger.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/maxSafeInteger.ts#L12)
For integers between Number.MIN_SAFE_INTEGER (included) and Number.MAX_SAFE_INTEGER (included)
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
### Remarks
Since 1.11.0
---
## Function: maxSafeNat()
> **maxSafeNat**(): [`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
Defined in: [packages/fast-check/src/arbitrary/maxSafeNat.ts:11](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/maxSafeNat.ts#L11)
For positive integers between 0 (included) and Number.MAX_SAFE_INTEGER (included)
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
### Remarks
Since 1.11.0
---
## Function: memo()
> **memo**\<`T`\>(`builder`): [`Memo`](../type-aliases/Memo.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/memo.ts:33](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/memo.ts#L33)
For mutually recursive types
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `builder` | (`maxDepth`) => [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | Arbitrary builder taken the maximal depth allowed as input (parameter `n`) |
### Returns
[`Memo`](../type-aliases/Memo.md)\<`T`\>
### Example
```typescript
// tree is 1 / 3 of node, 2 / 3 of leaf
const tree: fc.Memo = fc.memo(n => fc.oneof(node(n), leaf(), leaf()));
const node: fc.Memo = fc.memo(n => {
if (n <= 1) return fc.record({ left: leaf(), right: leaf() });
return fc.record({ left: tree(), right: tree() }); // tree() is equivalent to tree(n-1)
});
const leaf = fc.nat;
```
### Remarks
Since 1.16.0
---
## Function: mixedCase()
> **mixedCase**(`stringArb`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/mixedCase.ts:45](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/mixedCase.ts#L45)
Randomly switch the case of characters generated by `stringArb` (upper/lower)
WARNING:
Require bigint support.
Under-the-hood the arbitrary relies on bigint to compute the flags that should be toggled or not.
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `stringArb` | [`Arbitrary`](../classes/Arbitrary.md)\<`string`\> | Arbitrary able to build string values |
| `constraints?` | [`MixedCaseConstraints`](../interfaces/MixedCaseConstraints.md) | Constraints to be applied when computing upper/lower case version |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 1.17.0
---
## Function: modelRun()
> **modelRun**\<`Model`, `Real`, `InitialModel`\>(`s`, `cmds`): `void`
Defined in: [packages/fast-check/src/check/model/ModelRunner.ts:113](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/ModelRunner.ts#L113)
Run synchronous commands over a `Model` and the `Real` system
Throw in case of inconsistency
### Type Parameters
| Type Parameter |
| ------ |
| `Model` *extends* `object` |
| `Real` |
| `InitialModel` *extends* `object` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `s` | [`ModelRunSetup`](../type-aliases/ModelRunSetup.md)\<`InitialModel`, `Real`\> | Initial state provider |
| `cmds` | `Iterable`\<[`Command`](../interfaces/Command.md)\<`Model`, `Real`\>\> | Synchronous commands to be executed |
### Returns
`void`
### Remarks
Since 1.5.0
---
## Function: nat()
### Call Signature
> **nat**(): [`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
Defined in: [packages/fast-check/src/arbitrary/nat.ts:25](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/nat.ts#L25)
For positive integers between 0 (included) and 2147483647 (included)
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
#### Remarks
Since 0.0.1
### Call Signature
> **nat**(`max`): [`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
Defined in: [packages/fast-check/src/arbitrary/nat.ts:35](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/nat.ts#L35)
For positive integers between 0 (included) and max (included)
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `max` | `number` | Upper bound for the generated integers |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
#### Remarks
You may prefer to use `fc.nat({max})` instead.
### Call Signature
> **nat**(`constraints`): [`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
Defined in: [packages/fast-check/src/arbitrary/nat.ts:44](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/nat.ts#L44)
For positive integers between 0 (included) and max (included)
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`NatConstraints`](../interfaces/NatConstraints.md) | Constraints to apply when building instances |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
#### Remarks
Since 2.6.0
### Call Signature
> **nat**(`arg?`): [`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
Defined in: [packages/fast-check/src/arbitrary/nat.ts:53](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/nat.ts#L53)
For positive integers between 0 (included) and max (included)
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arg?` | `number` \| [`NatConstraints`](../interfaces/NatConstraints.md) | Either a maximum number or constraints to apply when building instances |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`number`\>
#### Remarks
Since 2.6.0
---
## Function: noBias()
> **noBias**\<`T`\>(`arb`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/noBias.ts:35](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/noBias.ts#L35)
Build an arbitrary without any bias.
The produced instance wraps the source one and ensures the bias factor will always be passed to undefined meaning bias will be deactivated.
All the rest stays unchanged.
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | The original arbitrary used for generating values. This arbitrary remains unchanged. |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
### Remarks
Since 3.20.0
---
## Function: noShrink()
> **noShrink**\<`T`\>(`arb`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/noShrink.ts:37](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/noShrink.ts#L37)
Build an arbitrary without shrinking capabilities.
NOTE:
In most cases, users should avoid disabling shrinking capabilities.
If the concern is the shrinking process taking too long or being unnecessary in CI environments,
consider using alternatives like `endOnFailure` or `interruptAfterTimeLimit` instead.
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | The original arbitrary used for generating values. This arbitrary remains unchanged, but its shrinking capabilities will not be included in the new arbitrary. |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
### Remarks
Since 3.20.0
---
## Function: object()
### Call Signature
> **object**(): [`Arbitrary`](../classes/Arbitrary.md)\<`Record`\<`string`, `unknown`\>\>
Defined in: [packages/fast-check/src/arbitrary/object.ts:31](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/object.ts#L31)
For any objects
You may use [sample](sample.md) to preview the values that will be generated
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Record`\<`string`, `unknown`\>\>
#### Example
```javascript
{}, {k: [{}, 1, 2]}
```
#### Remarks
Since 0.0.7
### Call Signature
> **object**(`constraints`): [`Arbitrary`](../classes/Arbitrary.md)\<`Record`\<`string`, `unknown`\>\>
Defined in: [packages/fast-check/src/arbitrary/object.ts:47](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/object.ts#L47)
For any objects following the constraints defined by `settings`
You may use [sample](sample.md) to preview the values that will be generated
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`ObjectConstraints`](../interfaces/ObjectConstraints.md) | Constraints to apply when building instances |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Record`\<`string`, `unknown`\>\>
#### Example
```javascript
{}, {k: [{}, 1, 2]}
```
#### Remarks
Since 0.0.7
---
## Function: oneof()
### Call Signature
> **oneof**\<`Ts`\>(...`arbs`): [`Arbitrary`](../classes/Arbitrary.md)\<[`OneOfValue`](../type-aliases/OneOfValue.md)\<`Ts`\>\>
Defined in: [packages/fast-check/src/arbitrary/oneof.ts:128](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/oneof.ts#L128)
For one of the values generated by `...arbs` - with all `...arbs` equiprobable
**WARNING**: It expects at least one arbitrary
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` *extends* [`MaybeWeightedArbitrary`](../type-aliases/MaybeWeightedArbitrary.md)\<`unknown`\>[] |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| ...`arbs` | `Ts` | Arbitraries that might be called to produce a value |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<[`OneOfValue`](../type-aliases/OneOfValue.md)\<`Ts`\>\>
#### Remarks
Since 0.0.1
### Call Signature
> **oneof**\<`Ts`\>(`constraints`, ...`arbs`): [`Arbitrary`](../classes/Arbitrary.md)\<[`OneOfValue`](../type-aliases/OneOfValue.md)\<`Ts`\>\>
Defined in: [packages/fast-check/src/arbitrary/oneof.ts:140](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/oneof.ts#L140)
For one of the values generated by `...arbs` - with all `...arbs` equiprobable
**WARNING**: It expects at least one arbitrary
#### Type Parameters
| Type Parameter |
| ------ |
| `Ts` *extends* [`MaybeWeightedArbitrary`](../type-aliases/MaybeWeightedArbitrary.md)\<`unknown`\>[] |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`OneOfConstraints`](../type-aliases/OneOfConstraints.md) | Constraints to be applied when generating the values |
| ...`arbs` | `Ts` | Arbitraries that might be called to produce a value |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<[`OneOfValue`](../type-aliases/OneOfValue.md)\<`Ts`\>\>
#### Remarks
Since 2.14.0
---
## Function: option()
> **option**\<`T`, `TNil`\>(`arb`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`T` \| `TNil`\>
Defined in: [packages/fast-check/src/arbitrary/option.ts:60](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/option.ts#L60)
For either nil or a value coming from `arb` with custom frequency
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `T` | - |
| `TNil` | `null` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | Arbitrary that will be called to generate a non nil value |
| `constraints` | [`OptionConstraints`](../interfaces/OptionConstraints.md)\<`TNil`\> | Constraints on the option(since 1.17.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T` \| `TNil`\>
### Remarks
Since 0.0.6
---
## Function: pre()
> **pre**(`expectTruthy`): `asserts expectTruthy`
Defined in: [packages/fast-check/src/check/precondition/Pre.ts:9](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/precondition/Pre.ts#L9)
Add pre-condition checks inside a property execution
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `expectTruthy` | `boolean` | cancel the run whenever this value is falsy |
### Returns
`asserts expectTruthy`
### Remarks
Since 1.3.0
---
## Function: property()
> **property**\<`Ts`\>(...`args`): [`IPropertyWithHooks`](../interfaces/IPropertyWithHooks.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/property/Property.ts:15](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/Property.ts#L15)
Instantiate a new fast-check#IProperty
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` *extends* \[`unknown`, `...unknown[]`\] |
### Parameters
| Parameter | Type |
| ------ | ------ |
| ...`args` | \[...arbitraries: \{ \[K in string \| number \| symbol\]: Arbitrary\ \}\[\], (...`args`) => `boolean` \| `void`\] |
### Returns
[`IPropertyWithHooks`](../interfaces/IPropertyWithHooks.md)\<`Ts`\>
### Remarks
Since 0.0.1
---
## Function: readConfigureGlobal()
> **readConfigureGlobal**(): [`GlobalParameters`](../type-aliases/GlobalParameters.md)
Defined in: [packages/fast-check/src/check/runner/configuration/GlobalParameters.ts:127](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/GlobalParameters.ts#L127)
Read global parameters that will be used by runners
### Returns
[`GlobalParameters`](../type-aliases/GlobalParameters.md)
### Remarks
Since 1.18.0
---
## Function: record()
> **record**\<`T`, `K`\>(`model`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<\{ \[K in string \| number \| symbol\]: (Partial\ & Pick\)\[K\] \}\>
Defined in: [packages/fast-check/src/arbitrary/record.ts:56](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/record.ts#L56)
For records following the `recordModel` schema
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `T` | - |
| `K` *extends* `string` \| `number` \| `symbol` | keyof `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `model` | \{ \[K in string \| number \| symbol\]: Arbitrary\ \} | - |
| `constraints?` | [`RecordConstraints`](../type-aliases/RecordConstraints.md)\<`K`\> | Contraints on the generated record |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<\{ \[K in string \| number \| symbol\]: (Partial\ & Pick\)\[K\] \}\>
### Example
```typescript
record({ x: someArbitraryInt, y: someArbitraryInt }, {requiredKeys: []}): Arbitrary<{x?:number,y?:number}>
// merge two integer arbitraries to produce a {x, y}, {x}, {y} or {} record
```
### Remarks
Since 0.0.12
---
## Function: resetConfigureGlobal()
> **resetConfigureGlobal**(): `void`
Defined in: [packages/fast-check/src/check/runner/configuration/GlobalParameters.ts:136](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/GlobalParameters.ts#L136)
Reset global parameters
### Returns
`void`
### Remarks
Since 1.18.0
---
## Function: sample()
> **sample**\<`Ts`\>(`generator`, `params?`): `Ts`[]
Defined in: [packages/fast-check/src/check/runner/Sampler.ts:62](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/Sampler.ts#L62)
Generate an array containing all the values that would have been generated during [assert](assert.md) or [check](check.md)
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `generator` | [`IRawProperty`](../interfaces/IRawProperty.md)\<`Ts`, `boolean`\> \| [`Arbitrary`](../classes/Arbitrary.md)\<`Ts`\> | [IProperty](../interfaces/IProperty.md) or [Arbitrary](../classes/Arbitrary.md) to extract the values from |
| `params?` | `number` \| [`Parameters`](../interfaces/Parameters.md)\<`Ts`\> | Integer representing the number of values to generate or `Parameters` as in [assert](assert.md) |
### Returns
`Ts`[]
### Example
```typescript
fc.sample(fc.nat(), 10); // extract 10 values from fc.nat() Arbitrary
fc.sample(fc.nat(), {seed: 42}); // extract values from fc.nat() as if we were running fc.assert with seed=42
```
### Remarks
Since 0.0.6
---
## Function: scheduledModelRun()
> **scheduledModelRun**\<`Model`, `Real`, `CheckAsync`, `InitialModel`\>(`scheduler`, `s`, `cmds`): `Promise`\<`void`\>
Defined in: [packages/fast-check/src/check/model/ModelRunner.ts:150](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/ModelRunner.ts#L150)
Run asynchronous and scheduled commands over a `Model` and the `Real` system
Throw in case of inconsistency
### Type Parameters
| Type Parameter |
| ------ |
| `Model` *extends* `object` |
| `Real` |
| `CheckAsync` *extends* `boolean` |
| `InitialModel` *extends* `object` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `scheduler` | [`Scheduler`](../interfaces/Scheduler.md) | Scheduler |
| `s` | [`ModelRunSetup`](../type-aliases/ModelRunSetup.md)\<`InitialModel`, `Real`\> \| [`ModelRunAsyncSetup`](../type-aliases/ModelRunAsyncSetup.md)\<`InitialModel`, `Real`\> | Initial state provider |
| `cmds` | `Iterable`\<[`AsyncCommand`](../interfaces/AsyncCommand.md)\<`Model`, `Real`, `CheckAsync`\>\> | Asynchronous commands to be executed |
### Returns
`Promise`\<`void`\>
### Remarks
Since 1.24.0
---
## Function: scheduler()
> **scheduler**\<`TMetaData`\>(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<[`Scheduler`](../interfaces/Scheduler.md)\<`TMetaData`\>\>
Defined in: [packages/fast-check/src/arbitrary/scheduler.ts:25](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/scheduler.ts#L25)
For scheduler of promises
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `TMetaData` | `unknown` |
### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints?` | [`SchedulerConstraints`](../interfaces/SchedulerConstraints.md) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<[`Scheduler`](../interfaces/Scheduler.md)\<`TMetaData`\>\>
### Remarks
Since 1.20.0
---
## Function: schedulerFor()
### Call Signature
> **schedulerFor**\<`TMetaData`\>(`constraints?`): (`_strs`, ...`ordering`) => [`Scheduler`](../interfaces/Scheduler.md)\<`TMetaData`\>
Defined in: [packages/fast-check/src/arbitrary/scheduler.ts:66](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/scheduler.ts#L66)
For custom scheduler with predefined resolution order
Ordering is defined by using a template string like the one generated in case of failure of a [scheduler](scheduler.md)
It may be something like:
#### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `TMetaData` | `unknown` |
#### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints?` | [`SchedulerConstraints`](../interfaces/SchedulerConstraints.md) |
#### Returns
(`_strs`, ...`ordering`) => [`Scheduler`](../interfaces/Scheduler.md)\<`TMetaData`\>
#### Example
```typescript
fc.schedulerFor()`
-> [task\${2}] promise pending
-> [task\${3}] promise pending
-> [task\${1}] promise pending
`
```
Or more generally:
```typescript
fc.schedulerFor()`
This scheduler will resolve task ${2} first
followed by ${3} and only then task ${1}
`
```
WARNING:
Custom scheduler will
neither check that all the referred promises have been scheduled
nor that they resolved with the same status and value.
WARNING:
If one the promises is wrongly defined it will fail - for instance asking to resolve 5 while 5 does not exist.
#### Remarks
Since 1.25.0
### Call Signature
> **schedulerFor**\<`TMetaData`\>(`customOrdering`, `constraints?`): [`Scheduler`](../interfaces/Scheduler.md)\<`TMetaData`\>
Defined in: [packages/fast-check/src/arbitrary/scheduler.ts:85](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/scheduler.ts#L85)
For custom scheduler with predefined resolution order
WARNING:
Custom scheduler will not check that all the referred promises have been scheduled.
WARNING:
If one the promises is wrongly defined it will fail - for instance asking to resolve 5 while 5 does not exist.
#### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `TMetaData` | `unknown` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `customOrdering` | `number`[] | Array defining in which order the promises will be resolved. Id of the promises start at 1. 1 means first scheduled promise, 2 second scheduled promise and so on. |
| `constraints?` | [`SchedulerConstraints`](../interfaces/SchedulerConstraints.md) | - |
#### Returns
[`Scheduler`](../interfaces/Scheduler.md)\<`TMetaData`\>
#### Remarks
Since 1.25.0
---
## Function: set()
> **set**\<`T`\>(`arb`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Set`\<`T`\>\>
Defined in: [packages/fast-check/src/arbitrary/set.ts:58](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/set.ts#L58)
For sets of values coming from `arb`
All the values in the set are unique. Comparison of values relies on `SameValueZero`
which is the same comparison algorithm used by `Set`.
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | Arbitrary used to generate the values inside the set |
| `constraints` | [`SetConstraints`](../type-aliases/SetConstraints.md) | Constraints to apply when building instances |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Set`\<`T`\>\>
### Remarks
Since 4.4.0
---
## Function: shuffledSubarray()
> **shuffledSubarray**\<`T`\>(`originalArray`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
Defined in: [packages/fast-check/src/arbitrary/shuffledSubarray.ts:33](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/shuffledSubarray.ts#L33)
For subarrays of `originalArray`
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `originalArray` | `T`[] | Original array |
| `constraints` | [`ShuffledSubarrayConstraints`](../interfaces/ShuffledSubarrayConstraints.md) | Constraints to apply when building instances (since 2.4.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
### Remarks
Since 1.5.0
---
## Function: sparseArray()
> **sparseArray**\<`T`\>(`arb`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
Defined in: [packages/fast-check/src/arbitrary/sparseArray.ts:95](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/sparseArray.ts#L95)
For sparse arrays of values coming from `arb`
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | Arbitrary used to generate the values inside the sparse array |
| `constraints` | [`SparseArrayConstraints`](../interfaces/SparseArrayConstraints.md) | Constraints to apply when building instances |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
### Remarks
Since 2.13.0
---
## Function: statistics()
> **statistics**\<`Ts`\>(`generator`, `classify`, `params?`): `void`
Defined in: [packages/fast-check/src/check/runner/Sampler.ts:95](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/Sampler.ts#L95)
Gather useful statistics concerning generated values
Print the result in `console.log` or `params.logger` (if defined)
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `generator` | [`IRawProperty`](../interfaces/IRawProperty.md)\<`Ts`, `boolean`\> \| [`Arbitrary`](../classes/Arbitrary.md)\<`Ts`\> | [IProperty](../interfaces/IProperty.md) or [Arbitrary](../classes/Arbitrary.md) to extract the values from |
| `classify` | (`v`) => `string` \| `string`[] | Classifier function that can classify the generated value in zero, one or more categories (with free labels) |
| `params?` | `number` \| [`Parameters`](../interfaces/Parameters.md)\<`Ts`\> | Integer representing the number of values to generate or `Parameters` as in [assert](assert.md) |
### Returns
`void`
### Example
```typescript
fc.statistics(
fc.nat(999),
v => v < 100 ? 'Less than 100' : 'More or equal to 100',
{numRuns: 1000, logger: console.log});
// Classify 1000 values generated by fc.nat(999) into two categories:
// - Less than 100
// - More or equal to 100
// The output will be sent line by line to the logger
```
### Remarks
Since 0.0.6
---
## Function: stream()
> **stream**\<`T`\>(`g`): [`Stream`](../classes/Stream.md)\<`T`\>
Defined in: [packages/fast-check/src/stream/Stream.ts:248](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/stream/Stream.ts#L248)
Create a Stream based on `g`
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `g` | `IterableIterator`\<`T`\> | Underlying data of the Stream |
### Returns
[`Stream`](../classes/Stream.md)\<`T`\>
### Remarks
Since 0.0.7
---
## Function: string()
> **string**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/string.ts:68](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/string.ts#L68)
For strings of char
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`StringConstraints`](../type-aliases/StringConstraints.md) | Constraints to apply when building instances (since 2.4.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 0.0.1
---
## Function: stringMatching()
> **stringMatching**(`regex`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/stringMatching.ts:271](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/stringMatching.ts#L271)
For strings matching the provided regex
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `regex` | `RegExp` | Arbitrary able to generate random strings (possibly multiple characters) |
| `constraints` | [`StringMatchingConstraints`](../type-aliases/StringMatchingConstraints.md) | Constraints to apply when building instances |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 3.10.0
---
## Function: stringify()
> **stringify**\<`Ts`\>(`value`): `string`
Defined in: [packages/fast-check/src/utils/stringify.ts:355](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/utils/stringify.ts#L355)
Convert any value to its fast-check string representation
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value` | `Ts` | Value to be converted into a string |
### Returns
`string`
### Remarks
Since 1.15.0
---
## Function: subarray()
> **subarray**\<`T`\>(`originalArray`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
Defined in: [packages/fast-check/src/arbitrary/subarray.ts:33](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/subarray.ts#L33)
For subarrays of `originalArray` (keeps ordering)
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `originalArray` | `T`[] | Original array |
| `constraints` | [`SubarrayConstraints`](../interfaces/SubarrayConstraints.md) | Constraints to apply when building instances (since 2.4.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
### Remarks
Since 1.5.0
---
## Function: timeout()
> **timeout**(`timeMs`): [`Plugin`](../type-aliases/Plugin.md)\<`unknown`\>
Defined in: [packages/fast-check/src/check/plugin/TimeoutPlugin.ts:58](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/TimeoutPlugin.ts#L58)
Mark the execution of a predicate as failed if it exceeds `timeMs` milliseconds to complete.
WARNING: It cannot stop a running predicate.
It mainly returns earlier so the test runner can move forward.
NOTE: It has no effect on a synchronously running predicate.
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `timeMs` | `number` | Maximal number of milliseconds granted to an execution of the predicate |
### Returns
[`Plugin`](../type-aliases/Plugin.md)\<`unknown`\>
### Example
```ts
fc.assert(
fc.asyncProperty(..., async (...) => {...}),
{ plugins: [fc.timeout(1000)] }
)
```
### Remarks
Since 4.10.0
---
## Function: tuple()
> **tuple**\<`Ts`\>(...`arbs`): [`Arbitrary`](../classes/Arbitrary.md)\<`Ts`\>
Defined in: [packages/fast-check/src/arbitrary/tuple.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/tuple.ts#L12)
For tuples produced using the provided `arbs`
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` *extends* `unknown`[] |
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| ...`arbs` | \{ \[K in string \| number \| symbol\]: Arbitrary\ \} | Ordered list of arbitraries |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Ts`\>
### Remarks
Since 0.0.1
---
## Function: uint16Array()
> **uint16Array**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Uint16Array`\<`ArrayBuffer`\>\>
Defined in: [packages/fast-check/src/arbitrary/uint16Array.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uint16Array.ts#L12)
For Uint16Array
### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints` | [`IntArrayConstraints`](../type-aliases/IntArrayConstraints.md) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Uint16Array`\<`ArrayBuffer`\>\>
### Remarks
Since 2.9.0
---
## Function: uint32Array()
> **uint32Array**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Uint32Array`\<`ArrayBuffer`\>\>
Defined in: [packages/fast-check/src/arbitrary/uint32Array.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uint32Array.ts#L12)
For Uint32Array
### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints` | [`IntArrayConstraints`](../type-aliases/IntArrayConstraints.md) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Uint32Array`\<`ArrayBuffer`\>\>
### Remarks
Since 2.9.0
---
## Function: uint8Array()
> **uint8Array**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Uint8Array`\<`ArrayBuffer`\>\>
Defined in: [packages/fast-check/src/arbitrary/uint8Array.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uint8Array.ts#L12)
For Uint8Array
### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints` | [`IntArrayConstraints`](../type-aliases/IntArrayConstraints.md) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Uint8Array`\<`ArrayBuffer`\>\>
### Remarks
Since 2.9.0
---
## Function: uint8ClampedArray()
> **uint8ClampedArray**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`Uint8ClampedArray`\<`ArrayBuffer`\>\>
Defined in: [packages/fast-check/src/arbitrary/uint8ClampedArray.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uint8ClampedArray.ts#L12)
For Uint8ClampedArray
### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints` | [`IntArrayConstraints`](../type-aliases/IntArrayConstraints.md) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`Uint8ClampedArray`\<`ArrayBuffer`\>\>
### Remarks
Since 2.9.0
---
## Function: ulid()
> **ulid**(): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/ulid.ts:41](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/ulid.ts#L41)
For ulid
According to [ulid spec](https://github.com/ulid/spec)
No mixed case, only upper case digits (0-9A-Z except for: I,L,O,U)
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 3.11.0
---
## Function: uniqueArray()
### Call Signature
> **uniqueArray**\<`T`, `U`\>(`arb`, `constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
Defined in: [packages/fast-check/src/arbitrary/uniqueArray.ts:179](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uniqueArray.ts#L179)
For arrays of unique values coming from `arb`
#### Type Parameters
| Type Parameter |
| ------ |
| `T` |
| `U` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | Arbitrary used to generate the values inside the array |
| `constraints?` | [`UniqueArrayConstraintsRecommended`](../type-aliases/UniqueArrayConstraintsRecommended.md)\<`T`, `U`\> | Constraints to apply when building instances |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
#### Remarks
Since 2.23.0
### Call Signature
> **uniqueArray**\<`T`\>(`arb`, `constraints`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
Defined in: [packages/fast-check/src/arbitrary/uniqueArray.ts:192](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uniqueArray.ts#L192)
For arrays of unique values coming from `arb`
#### Type Parameters
| Type Parameter |
| ------ |
| `T` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | Arbitrary used to generate the values inside the array |
| `constraints` | [`UniqueArrayConstraintsCustomCompare`](../type-aliases/UniqueArrayConstraintsCustomCompare.md)\<`T`\> | Constraints to apply when building instances |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
#### Remarks
Since 2.23.0
### Call Signature
> **uniqueArray**\<`T`, `U`\>(`arb`, `constraints`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
Defined in: [packages/fast-check/src/arbitrary/uniqueArray.ts:202](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uniqueArray.ts#L202)
For arrays of unique values coming from `arb`
#### Type Parameters
| Type Parameter |
| ------ |
| `T` |
| `U` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | Arbitrary used to generate the values inside the array |
| `constraints` | [`UniqueArrayConstraintsCustomCompareSelect`](../type-aliases/UniqueArrayConstraintsCustomCompareSelect.md)\<`T`, `U`\> | Constraints to apply when building instances |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
#### Remarks
Since 2.23.0
### Call Signature
> **uniqueArray**\<`T`, `U`\>(`arb`, `constraints`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
Defined in: [packages/fast-check/src/arbitrary/uniqueArray.ts:215](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uniqueArray.ts#L215)
For arrays of unique values coming from `arb`
#### Type Parameters
| Type Parameter |
| ------ |
| `T` |
| `U` |
#### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `arb` | [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> | Arbitrary used to generate the values inside the array |
| `constraints` | [`UniqueArrayConstraints`](../type-aliases/UniqueArrayConstraints.md)\<`T`, `U`\> | Constraints to apply when building instances |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`[]\>
#### Remarks
Since 2.23.0
---
## Function: uuid()
> **uuid**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/uuid.ts:56](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uuid.ts#L56)
For UUID from v1 to v5
According to [RFC 4122](https://tools.ietf.org/html/rfc4122)
No mixed case, only lower case digits (0-9a-f)
### Parameters
| Parameter | Type |
| ------ | ------ |
| `constraints` | [`UuidConstraints`](../interfaces/UuidConstraints.md) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 1.17.0
---
## Function: webAuthority()
> **webAuthority**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/webAuthority.ts:103](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webAuthority.ts#L103)
For web authority
According to [RFC 3986](https://www.ietf.org/rfc/rfc3986.txt) - `authority = [ userinfo "@" ] host [ ":" port ]`
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints?` | [`WebAuthorityConstraints`](../interfaces/WebAuthorityConstraints.md) | Constraints to apply when building instances |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 1.14.0
---
## Function: webFragments()
> **webFragments**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/webFragments.ts:30](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webFragments.ts#L30)
For fragments of an URI (web included)
According to [RFC 3986](https://www.ietf.org/rfc/rfc3986.txt)
eg.: In the url `https://domain/plop?page=1#hello=1&world=2`, `?hello=1&world=2` are query parameters
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`WebFragmentsConstraints`](../interfaces/WebFragmentsConstraints.md) | Constraints to apply when building instances (since 2.22.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 1.14.0
---
## Function: webPath()
> **webPath**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/webPath.ts:30](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webPath.ts#L30)
For web path
According to [RFC 3986](https://www.ietf.org/rfc/rfc3986.txt) and
[WHATWG URL Standard](https://url.spec.whatwg.org/)
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints?` | [`WebPathConstraints`](../interfaces/WebPathConstraints.md) | Constraints to apply when building instances |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 3.3.0
---
## Function: webQueryParameters()
> **webQueryParameters**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/webQueryParameters.ts:30](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webQueryParameters.ts#L30)
For query parameters of an URI (web included)
According to [RFC 3986](https://www.ietf.org/rfc/rfc3986.txt)
eg.: In the url `https://domain/plop/?hello=1&world=2`, `?hello=1&world=2` are query parameters
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`WebQueryParametersConstraints`](../interfaces/WebQueryParametersConstraints.md) | Constraints to apply when building instances (since 2.22.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 1.14.0
---
## Function: webSegment()
> **webSegment**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/webSegment.ts:31](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webSegment.ts#L31)
For internal segment of an URI (web included)
According to [RFC 3986](https://www.ietf.org/rfc/rfc3986.txt)
eg.: In the url `https://github.com/dubzzz/fast-check/`, `dubzzz` and `fast-check` are segments
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints` | [`WebSegmentConstraints`](../interfaces/WebSegmentConstraints.md) | Constraints to apply when building instances (since 2.22.0) |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 1.14.0
---
## Function: webUrl()
> **webUrl**(`constraints?`): [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/webUrl.ts:63](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webUrl.ts#L63)
For web url
According to [RFC 3986](https://www.ietf.org/rfc/rfc3986.txt) and
[WHATWG URL Standard](https://url.spec.whatwg.org/)
### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `constraints?` | [`WebUrlConstraints`](../interfaces/WebUrlConstraints.md) | Constraints to apply when building instances |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
### Remarks
Since 1.14.0
---
## API Reference
### Enumerations
| Enumeration | Description |
| ------ | ------ |
| [ExecutionStatus](enumerations/ExecutionStatus.md) | Status of the execution of the property |
| [VerbosityLevel](enumerations/VerbosityLevel.md) | Verbosity level |
### Classes
| Class | Description |
| ------ | ------ |
| [Arbitrary](classes/Arbitrary.md) | Abstract class able to generate values on type `T` |
| [PreconditionFailure](classes/PreconditionFailure.md) | Error type produced whenever a precondition fails |
| [Random](classes/Random.md) | Wrapper around an instance of a `pure-rand`'s random number generator offering a simpler interface to deal with random with impure patterns |
| [Stream](classes/Stream.md) | Wrapper around `IterableIterator` interface offering a set of helpers to deal with iterations in a simple way |
| [Value](classes/Value.md) | A `Value` holds an internal value of type `T` and its associated context |
### Interfaces
| Interface | Description |
| ------ | ------ |
| [ArrayConstraints](interfaces/ArrayConstraints.md) | Constraints to be applied on [array](functions/array.md) |
| [AsyncCommand](interfaces/AsyncCommand.md) | Interface that should be implemented in order to define an asynchronous command |
| [BigIntConstraints](interfaces/BigIntConstraints.md) | Constraints to be applied on [bigInt](functions/bigInt.md) |
| [Command](interfaces/Command.md) | Interface that should be implemented in order to define a synchronous command |
| [CommandsContraints](interfaces/CommandsContraints.md) | Parameters for [commands](functions/commands.md) |
| [ContextValue](interfaces/ContextValue.md) | Execution context attached to one predicate run |
| [DateConstraints](interfaces/DateConstraints.md) | Constraints to be applied on [date](functions/date.md) |
| [DictionaryConstraints](interfaces/DictionaryConstraints.md) | Constraints to be applied on [dictionary](functions/dictionary.md) |
| [DomainConstraints](interfaces/DomainConstraints.md) | Constraints to be applied on [domain](functions/domain.md) |
| [DoubleConstraints](interfaces/DoubleConstraints.md) | Constraints to be applied on [double](functions/double.md) |
| [EmailAddressConstraints](interfaces/EmailAddressConstraints.md) | Constraints to be applied on [emailAddress](functions/emailAddress.md) |
| [ExecutionTree](interfaces/ExecutionTree.md) | Summary of the execution process |
| [FalsyContraints](interfaces/FalsyContraints.md) | Constraints to be applied on [falsy](functions/falsy.md) |
| [FloatConstraints](interfaces/FloatConstraints.md) | Constraints to be applied on [float](functions/float.md) |
| [IAsyncProperty](interfaces/IAsyncProperty.md) | Interface for asynchronous property, see [IRawProperty](interfaces/IRawProperty.md) |
| [IAsyncPropertyWithHooks](interfaces/IAsyncPropertyWithHooks.md) | Interface for asynchronous property defining hooks, see [IAsyncProperty](interfaces/IAsyncProperty.md) |
| [ICommand](interfaces/ICommand.md) | Interface that should be implemented in order to define a command |
| [IntegerConstraints](interfaces/IntegerConstraints.md) | Constraints to be applied on [integer](functions/integer.md) |
| [IProperty](interfaces/IProperty.md) | Interface for synchronous property, see [IRawProperty](interfaces/IRawProperty.md) |
| [IPropertyWithHooks](interfaces/IPropertyWithHooks.md) | Interface for synchronous property defining hooks, see [IProperty](interfaces/IProperty.md) |
| [IRawProperty](interfaces/IRawProperty.md) | Property |
| [JsonSharedConstraints](interfaces/JsonSharedConstraints.md) | Shared constraints for: - [json](functions/json.md), - [jsonValue](functions/jsonValue.md), |
| [LetrecTypedTie](interfaces/LetrecTypedTie.md) | Strongly typed type for the `tie` function passed by [letrec](functions/letrec.md) to the `builder` function we pass to it. You may want also want to use its loosely typed version [LetrecLooselyTypedTie](type-aliases/LetrecLooselyTypedTie.md). |
| [LoremConstraints](interfaces/LoremConstraints.md) | Constraints to be applied on [lorem](functions/lorem.md) |
| [MapConstraints](interfaces/MapConstraints.md) | Constraints to be applied on [map](functions/map.md) |
| [MixedCaseConstraints](interfaces/MixedCaseConstraints.md) | Constraints to be applied on [mixedCase](functions/mixedCase.md) |
| [NatConstraints](interfaces/NatConstraints.md) | Constraints to be applied on [nat](functions/nat.md) |
| [ObjectConstraints](interfaces/ObjectConstraints.md) | Constraints for [anything](functions/anything.md) and [object](functions/object.md) |
| [OptionConstraints](interfaces/OptionConstraints.md) | Constraints to be applied on [option](functions/option.md) |
| [Parameters](interfaces/Parameters.md) | Customization of the parameters used to run the properties |
| [RunDetailsCommon](interfaces/RunDetailsCommon.md) | Shared part between variants of RunDetails |
| [RunDetailsFailureInterrupted](interfaces/RunDetailsFailureInterrupted.md) | Run reported as failed because it took too long and thus has been interrupted |
| [RunDetailsFailureProperty](interfaces/RunDetailsFailureProperty.md) | Run reported as failed because the property failed |
| [RunDetailsFailureTooManySkips](interfaces/RunDetailsFailureTooManySkips.md) | Run reported as failed because too many retries have been attempted to generate valid values |
| [RunDetailsSuccess](interfaces/RunDetailsSuccess.md) | Run reported as success |
| [Scheduler](interfaces/Scheduler.md) | Instance able to reschedule the ordering of promises for a given app |
| [SchedulerConstraints](interfaces/SchedulerConstraints.md) | Constraints to be applied on [scheduler](functions/scheduler.md) |
| [SchedulerReportItem](interfaces/SchedulerReportItem.md) | Describe a task for the report produced by the scheduler |
| [ShuffledSubarrayConstraints](interfaces/ShuffledSubarrayConstraints.md) | Constraints to be applied on [shuffledSubarray](functions/shuffledSubarray.md) |
| [SparseArrayConstraints](interfaces/SparseArrayConstraints.md) | Constraints to be applied on [sparseArray](functions/sparseArray.md) |
| [StringSharedConstraints](interfaces/StringSharedConstraints.md) | Constraints to be applied on arbitraries for strings |
| [SubarrayConstraints](interfaces/SubarrayConstraints.md) | Constraints to be applied on [subarray](functions/subarray.md) |
| [UuidConstraints](interfaces/UuidConstraints.md) | Constraints to be applied on [uuid](functions/uuid.md) |
| [WebAuthorityConstraints](interfaces/WebAuthorityConstraints.md) | Constraints to be applied on [webAuthority](functions/webAuthority.md) |
| [WebFragmentsConstraints](interfaces/WebFragmentsConstraints.md) | Constraints to be applied on [webFragments](functions/webFragments.md) |
| [WebPathConstraints](interfaces/WebPathConstraints.md) | Constraints to be applied on [webPath](functions/webPath.md) |
| [WebQueryParametersConstraints](interfaces/WebQueryParametersConstraints.md) | Constraints to be applied on [webQueryParameters](functions/webQueryParameters.md) |
| [WebSegmentConstraints](interfaces/WebSegmentConstraints.md) | Constraints to be applied on [webSegment](functions/webSegment.md) |
| [WebUrlConstraints](interfaces/WebUrlConstraints.md) | Constraints to be applied on [webUrl](functions/webUrl.md) |
| [WeightedArbitrary](interfaces/WeightedArbitrary.md) | Conjonction of a weight and an arbitrary used by [oneof](functions/oneof.md) in order to generate values |
| [WithCloneMethod](interfaces/WithCloneMethod.md) | Object instance that should be cloned from one generation/shrink to another |
### Type Aliases
| Type Alias | Description |
| ------ | ------ |
| [~~AsyncPropertyHookFunction~~](type-aliases/AsyncPropertyHookFunction.md) | Type of legal hook function that can be used to call `beforeEach` or `afterEach` on a [IAsyncPropertyWithHooks](interfaces/IAsyncPropertyWithHooks.md) |
| [BigIntArrayConstraints](type-aliases/BigIntArrayConstraints.md) | Constraints to be applied on typed arrays for big int values |
| [CloneValue](type-aliases/CloneValue.md) | Type of the value produced by [clone](functions/clone.md) |
| [DepthContext](type-aliases/DepthContext.md) | 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 |
| [DepthIdentifier](type-aliases/DepthIdentifier.md) | Type used to strongly type instances of depth identifier while keeping internals what they contain internally |
| [DepthSize](type-aliases/DepthSize.md) | Superset of [Size](type-aliases/Size.md) to override the default defined for size. It can either be based on a numeric value manually selected by the user (not recommended) or rely on presets based on size (recommended). |
| [EntityGraphArbitraries](type-aliases/EntityGraphArbitraries.md) | Defines all entity types and their data fields for [entityGraph](functions/entityGraph.md). |
| [EntityGraphConstraints](type-aliases/EntityGraphConstraints.md) | Constraints to be applied on [entityGraph](functions/entityGraph.md) |
| [~~EntityGraphContraints~~](type-aliases/EntityGraphContraints.md) | Constraints to be applied on [entityGraph](functions/entityGraph.md) |
| [EntityGraphRelations](type-aliases/EntityGraphRelations.md) | Defines all relationships between entity types for [entityGraph](functions/entityGraph.md). |
| [EntityGraphValue](type-aliases/EntityGraphValue.md) | Type of the values generated by [entityGraph](functions/entityGraph.md). |
| [FalsyValue](type-aliases/FalsyValue.md) | Typing for values generated by [falsy](functions/falsy.md) |
| [Float32ArrayConstraints](type-aliases/Float32ArrayConstraints.md) | Constraints to be applied on [float32Array](functions/float32Array.md) |
| [Float64ArrayConstraints](type-aliases/Float64ArrayConstraints.md) | Constraints to be applied on [float64Array](functions/float64Array.md) |
| [GeneratorValue](type-aliases/GeneratorValue.md) | An instance of [GeneratorValue](type-aliases/GeneratorValue.md) can be leveraged within predicates themselves to produce extra random values while preserving part of the shrinking capabilities on the produced values. |
| [GlobalAsyncPropertyHookFunction](type-aliases/GlobalAsyncPropertyHookFunction.md) | Type of legal hook function that can be used in the global parameter `asyncBeforeEach` and/or `asyncAfterEach` Prefer `beforeEach` and/or `afterEach` plugins: `fc.assert(property, { plugins: [fc.beforeEach(fn)] })` |
| [GlobalParameters](type-aliases/GlobalParameters.md) | Type describing the global overrides |
| [GlobalPropertyHookFunction](type-aliases/GlobalPropertyHookFunction.md) | Type of legal hook function that can be used in the global parameter `beforeEach` and/or `afterEach` Prefer `beforeEach` and/or `afterEach` plugins: `fc.assert(property, { plugins: [fc.beforeEach(fn)] })` |
| [IntArrayConstraints](type-aliases/IntArrayConstraints.md) | Constraints to be applied on typed arrays for integer values |
| [InterruptAfterTimeLimitOptions](type-aliases/InterruptAfterTimeLimitOptions.md) | Options for [interruptAfterTimeLimit](functions/interruptAfterTimeLimit.md) |
| [JsonValue](type-aliases/JsonValue.md) | Typings for a Json value |
| [LetrecLooselyTypedBuilder](type-aliases/LetrecLooselyTypedBuilder.md) | Loosely typed type for the `builder` function passed to [letrec](functions/letrec.md). You may want also want to use its strongly typed version [LetrecTypedBuilder](type-aliases/LetrecTypedBuilder.md). |
| [LetrecLooselyTypedTie](type-aliases/LetrecLooselyTypedTie.md) | Loosely typed type for the `tie` function passed by [letrec](functions/letrec.md) to the `builder` function we pass to it. You may want also want to use its strongly typed version [LetrecTypedTie](interfaces/LetrecTypedTie.md). |
| [LetrecTypedBuilder](type-aliases/LetrecTypedBuilder.md) | Strongly typed type for the `builder` function passed to [letrec](functions/letrec.md). You may want also want to use its loosely typed version [LetrecLooselyTypedBuilder](type-aliases/LetrecLooselyTypedBuilder.md). |
| [LetrecValue](type-aliases/LetrecValue.md) | Type of the value produced by [letrec](functions/letrec.md) |
| [MaybeWeightedArbitrary](type-aliases/MaybeWeightedArbitrary.md) | Either an `Arbitrary` or a `WeightedArbitrary` |
| [Memo](type-aliases/Memo.md) | Output type for [memo](functions/memo.md) |
| [ModelRunAsyncSetup](type-aliases/ModelRunAsyncSetup.md) | Asynchronous definition of model and real |
| [ModelRunSetup](type-aliases/ModelRunSetup.md) | Synchronous definition of model and real |
| [OneOfConstraints](type-aliases/OneOfConstraints.md) | Constraints to be applied on [oneof](functions/oneof.md) |
| [OneOfValue](type-aliases/OneOfValue.md) | Infer the type of the Arbitrary produced by [oneof](functions/oneof.md) given the type of the source arbitraries |
| [Plugin](type-aliases/Plugin.md) | Builder instantiating a plugin. Each property will instantiate its own plugin when starting to be assessed via [check](functions/check.md) or [assert](functions/assert.md). |
| [PluginInstance](type-aliases/PluginInstance.md) | Runtime part of a plugin. |
| [PluginStore](type-aliases/PluginStore.md) | Storage shared by all the plugins instantiated for one call to [check](functions/check.md) or [assert](functions/assert.md). Use it to cooperate across plugins. |
| [PropertyFailure](type-aliases/PropertyFailure.md) | Represent failures of the property |
| [~~PropertyHookFunction~~](type-aliases/PropertyHookFunction.md) | Type of legal hook function that can be used to call `beforeEach` or `afterEach` on a [IPropertyWithHooks](interfaces/IPropertyWithHooks.md) |
| [RandomGenerator](type-aliases/RandomGenerator.md) | Merged type supporting both pure-rand v7 and v8 random generators. Keeping compatibility with v7 avoids a breaking API change and a new major version. |
| [RandomType](type-aliases/RandomType.md) | Random generators automatically recognized by the framework without having to pass a builder function |
| [RecordConstraints](type-aliases/RecordConstraints.md) | Constraints to be applied on [record](functions/record.md) |
| [RecordValue](type-aliases/RecordValue.md) | Infer the type of the Arbitrary produced by record given the type of the source arbitrary and constraints to be applied |
| [RunDetails](type-aliases/RunDetails.md) | Post-run details produced by [check](functions/check.md) |
| [SchedulerAct](type-aliases/SchedulerAct.md) | Function responsible to run the passed function and surround it with whatever needed. The name has been inspired from the `act` function coming with React. |
| [SchedulerSequenceItem](type-aliases/SchedulerSequenceItem.md) | Define an item to be passed to `scheduleSequence` |
| [SetConstraints](type-aliases/SetConstraints.md) | Constraints to be applied on [set](functions/set.md) |
| [Size](type-aliases/Size.md) | The size parameter defines how large the generated values could be. |
| [SizeForArbitrary](type-aliases/SizeForArbitrary.md) | Superset of [Size](type-aliases/Size.md) to override the default defined for size |
| [StringConstraints](type-aliases/StringConstraints.md) | Constraints to be applied on arbitrary [string](functions/string.md) |
| [StringMatchingConstraints](type-aliases/StringMatchingConstraints.md) | Constraints to be applied on the arbitrary [stringMatching](functions/stringMatching.md) |
| [UniqueArrayConstraints](type-aliases/UniqueArrayConstraints.md) | Constraints implying known and optimized comparison function to be applied on [uniqueArray](functions/uniqueArray.md) |
| [UniqueArrayConstraintsCustomCompare](type-aliases/UniqueArrayConstraintsCustomCompare.md) | Constraints implying a fully custom comparison function to be applied on [uniqueArray](functions/uniqueArray.md) |
| [UniqueArrayConstraintsCustomCompareSelect](type-aliases/UniqueArrayConstraintsCustomCompareSelect.md) | Constraints implying fully custom comparison function and selector to be applied on [uniqueArray](functions/uniqueArray.md) |
| [UniqueArrayConstraintsRecommended](type-aliases/UniqueArrayConstraintsRecommended.md) | Constraints implying known and optimized comparison function to be applied on [uniqueArray](functions/uniqueArray.md) |
| [UniqueArraySharedConstraints](type-aliases/UniqueArraySharedConstraints.md) | Shared constraints to be applied on [uniqueArray](functions/uniqueArray.md) |
| [WithAsyncToStringMethod](type-aliases/WithAsyncToStringMethod.md) | Interface to implement for [asyncToStringMethod](variables/asyncToStringMethod.md) |
| [WithToStringMethod](type-aliases/WithToStringMethod.md) | Interface to implement for [toStringMethod](variables/toStringMethod.md) |
### Variables
| Variable | Description |
| ------ | ------ |
| [\_\_commitHash](variables/commitHash.md) | Commit hash of the current code (eg.: process.env.__COMMIT_HASH__) |
| [\_\_type](variables/type.md) | Type of module (commonjs or module) |
| [\_\_version](variables/version.md) | Version of fast-check used by your project (eg.: process.env.__PACKAGE_VERSION__) |
| [asyncToStringMethod](variables/asyncToStringMethod.md) | Use this symbol to define a custom serializer for your instances. Serializer must be a function returning a promise of string (see [WithAsyncToStringMethod](type-aliases/WithAsyncToStringMethod.md)). |
| [cloneMethod](variables/cloneMethod.md) | Generated instances having a method [cloneMethod] will be automatically cloned whenever necessary |
| [toStringMethod](variables/toStringMethod.md) | Use this symbol to define a custom serializer for your instances. Serializer must be a function returning a string (see [WithToStringMethod](type-aliases/WithToStringMethod.md)). |
### Functions
| Function | Description |
| ------ | ------ |
| [afterEach](functions/afterEach.md) | Register a callback to be called after each run of your predicate. If the function returns a promise, we wait until the promise resolves before running anything else. |
| [anything](functions/anything.md) | For any type of values |
| [array](functions/array.md) | For arrays of values coming from `arb` |
| [assert](functions/assert.md) | Run the property, throw in case of failure |
| [asyncDefaultReportMessage](functions/asyncDefaultReportMessage.md) | Format output of [check](functions/check.md) using the default error reporting of [assert](functions/assert.md) |
| [asyncModelRun](functions/asyncModelRun.md) | Run asynchronous commands over a `Model` and the `Real` system |
| [asyncProperty](functions/asyncProperty.md) | Instantiate a new fast-check#IAsyncProperty |
| [asyncStringify](functions/asyncStringify.md) | Convert any value to its fast-check string representation |
| [base64String](functions/base64String.md) | For base64 strings |
| [beforeEach](functions/beforeEach.md) | Register a callback to be called before each run of your predicate. If the function returns a promise, we wait until the promise resolves before running anything else. |
| [bigInt](functions/bigInt.md) | For bigint |
| [bigInt64Array](functions/bigInt64Array.md) | For BigInt64Array |
| [bigUint64Array](functions/bigUint64Array.md) | For BigUint64Array |
| [boolean](functions/boolean.md) | For boolean values - `true` or `false` |
| [chainUntil](functions/chainUntil.md) | Build an arbitrary by iteratively chaining arbitraries until the chainer returns undefined. |
| [check](functions/check.md) | Run the property, do not throw contrary to [assert](functions/assert.md) |
| [clone](functions/clone.md) | Clone the values generated by `arb` in order to produce fully equal values (might not be equal in terms of === or ==) |
| [cloneIfNeeded](functions/cloneIfNeeded.md) | Clone an instance if needed |
| [commands](functions/commands.md) | For arrays of [AsyncCommand](interfaces/AsyncCommand.md) to be executed by [asyncModelRun](functions/asyncModelRun.md) |
| [compareBooleanFunc](functions/compareBooleanFunc.md) | For comparison boolean functions |
| [compareFunc](functions/compareFunc.md) | For comparison functions |
| [configureGlobal](functions/configureGlobal.md) | Define global parameters that will be used by all the runners |
| [constant](functions/constant.md) | For `value` |
| [constantFrom](functions/constantFrom.md) | For one `...values` values - all equiprobable |
| [context](functions/context.md) | Produce a [ContextValue](interfaces/ContextValue.md) instance |
| [createDepthIdentifier](functions/createDepthIdentifier.md) | Create a new and unique instance of DepthIdentifier that can be shared across multiple arbitraries if needed |
| [date](functions/date.md) | For date between constraints.min or new Date(-8640000000000000) (included) and constraints.max or new Date(8640000000000000) (included) |
| [defaultReportMessage](functions/defaultReportMessage.md) | Format output of [check](functions/check.md) using the default error reporting of [assert](functions/assert.md) |
| [dictionary](functions/dictionary.md) | For dictionaries with keys produced by `keyArb` and values from `valueArb` |
| [domain](functions/domain.md) | For domains having an extension with at least two lowercase characters |
| [double](functions/double.md) | For 64-bit floating point numbers: - sign: 1 bit - significand: 52 bits - exponent: 11 bits |
| [emailAddress](functions/emailAddress.md) | For email address |
| [entityGraph](functions/entityGraph.md) | Generates interconnected entities with relationships based on a schema definition. |
| [falsy](functions/falsy.md) | For falsy values: - '' - 0 - NaN - false - null - undefined - 0n (whenever withBigInt: true) |
| [float](functions/float.md) | For 32-bit floating point numbers: - sign: 1 bit - significand: 23 bits - exponent: 8 bits |
| [float32Array](functions/float32Array.md) | For Float32Array |
| [float64Array](functions/float64Array.md) | For Float64Array |
| [func](functions/func.md) | For pure functions |
| [gen](functions/gen.md) | Generate values within the test execution itself by leveraging the strength of `gen` |
| [getDepthContextFor](functions/getDepthContextFor.md) | Get back the requested DepthContext |
| [hasAsyncToStringMethod](functions/hasAsyncToStringMethod.md) | Check if an instance implements [WithAsyncToStringMethod](type-aliases/WithAsyncToStringMethod.md) |
| [hasCloneMethod](functions/hasCloneMethod.md) | Check if an instance has to be clone |
| [hash](functions/hash.md) | CRC-32 based hash function |
| [hasToStringMethod](functions/hasToStringMethod.md) | Check if an instance implements [WithToStringMethod](type-aliases/WithToStringMethod.md) |
| [infiniteStream](functions/infiniteStream.md) | Produce an infinite stream of values |
| [installGlobalPlugin](functions/installGlobalPlugin.md) | Install a plugin to be used by all the runners Installed plugins come before the ones passed via the `plugins` option of the run. |
| [int16Array](functions/int16Array.md) | For Int16Array |
| [int32Array](functions/int32Array.md) | For Int32Array |
| [int8Array](functions/int8Array.md) | For Int8Array |
| [integer](functions/integer.md) | For integers between min (included) and max (included) |
| [interruptAfterTimeLimit](functions/interruptAfterTimeLimit.md) | Interrupt test execution after a given time limit. |
| [ipV4](functions/ipV4.md) | For valid IP v4 |
| [ipV4Extended](functions/ipV4Extended.md) | For valid IP v4 according to WhatWG |
| [ipV6](functions/ipV6.md) | For valid IP v6 |
| [json](functions/json.md) | For any JSON strings |
| [jsonValue](functions/jsonValue.md) | For any JSON compliant values |
| [letrec](functions/letrec.md) | For mutually recursive types |
| [limitShrink](functions/limitShrink.md) | Create another Arbitrary with a limited (or capped) number of shrink values |
| [lorem](functions/lorem.md) | For lorem ipsum string of words or sentences with maximal number of words or sentences |
| [map](functions/map.md) | For Maps with keys produced by `keyArb` and values from `valueArb` |
| [mapToConstant](functions/mapToConstant.md) | Generate non-contiguous ranges of values by mapping integer values to constant |
| [maxSafeInteger](functions/maxSafeInteger.md) | For integers between Number.MIN_SAFE_INTEGER (included) and Number.MAX_SAFE_INTEGER (included) |
| [maxSafeNat](functions/maxSafeNat.md) | For positive integers between 0 (included) and Number.MAX_SAFE_INTEGER (included) |
| [memo](functions/memo.md) | For mutually recursive types |
| [mixedCase](functions/mixedCase.md) | Randomly switch the case of characters generated by `stringArb` (upper/lower) |
| [modelRun](functions/modelRun.md) | Run synchronous commands over a `Model` and the `Real` system |
| [nat](functions/nat.md) | For positive integers between 0 (included) and 2147483647 (included) |
| [noBias](functions/noBias.md) | Build an arbitrary without any bias. |
| [noShrink](functions/noShrink.md) | Build an arbitrary without shrinking capabilities. |
| [object](functions/object.md) | For any objects |
| [oneof](functions/oneof.md) | For one of the values generated by `...arbs` - with all `...arbs` equiprobable |
| [option](functions/option.md) | For either nil or a value coming from `arb` with custom frequency |
| [pre](functions/pre.md) | Add pre-condition checks inside a property execution |
| [property](functions/property.md) | Instantiate a new fast-check#IProperty |
| [readConfigureGlobal](functions/readConfigureGlobal.md) | Read global parameters that will be used by runners |
| [record](functions/record.md) | For records following the `recordModel` schema |
| [resetConfigureGlobal](functions/resetConfigureGlobal.md) | Reset global parameters |
| [sample](functions/sample.md) | Generate an array containing all the values that would have been generated during [assert](functions/assert.md) or [check](functions/check.md) |
| [scheduledModelRun](functions/scheduledModelRun.md) | Run asynchronous and scheduled commands over a `Model` and the `Real` system |
| [scheduler](functions/scheduler.md) | For scheduler of promises |
| [schedulerFor](functions/schedulerFor.md) | For custom scheduler with predefined resolution order |
| [set](functions/set.md) | For sets of values coming from `arb` |
| [shuffledSubarray](functions/shuffledSubarray.md) | For subarrays of `originalArray` |
| [sparseArray](functions/sparseArray.md) | For sparse arrays of values coming from `arb` |
| [statistics](functions/statistics.md) | Gather useful statistics concerning generated values |
| [stream](functions/stream.md) | Create a Stream based on `g` |
| [string](functions/string.md) | For strings of char |
| [stringify](functions/stringify.md) | Convert any value to its fast-check string representation |
| [stringMatching](functions/stringMatching.md) | For strings matching the provided regex |
| [subarray](functions/subarray.md) | For subarrays of `originalArray` (keeps ordering) |
| [timeout](functions/timeout.md) | Mark the execution of a predicate as failed if it exceeds `timeMs` milliseconds to complete. |
| [tuple](functions/tuple.md) | For tuples produced using the provided `arbs` |
| [uint16Array](functions/uint16Array.md) | For Uint16Array |
| [uint32Array](functions/uint32Array.md) | For Uint32Array |
| [uint8Array](functions/uint8Array.md) | For Uint8Array |
| [uint8ClampedArray](functions/uint8ClampedArray.md) | For Uint8ClampedArray |
| [ulid](functions/ulid.md) | For ulid |
| [uniqueArray](functions/uniqueArray.md) | For arrays of unique values coming from `arb` |
| [uuid](functions/uuid.md) | For UUID from v1 to v5 |
| [webAuthority](functions/webAuthority.md) | For web authority |
| [webFragments](functions/webFragments.md) | For fragments of an URI (web included) |
| [webPath](functions/webPath.md) | For web path |
| [webQueryParameters](functions/webQueryParameters.md) | For query parameters of an URI (web included) |
| [webSegment](functions/webSegment.md) | For internal segment of an URI (web included) |
| [webUrl](functions/webUrl.md) | For web url |
---
## Interface: ArrayConstraints
Defined in: [packages/fast-check/src/arbitrary/array.ts:15](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/array.ts#L15)
Constraints to be applied on [array](../functions/array.md)
### Remarks
Since 2.4.0
### Properties
#### depthIdentifier? {#depthidentifier}
> `optional` **depthIdentifier?**: `string` \| [`DepthIdentifier`](../type-aliases/DepthIdentifier.md)
Defined in: [packages/fast-check/src/arbitrary/array.ts:51](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/array.ts#L51)
When receiving a depth identifier, the arbitrary will impact the depth
attached to it to avoid going too deep if it already generated lots of items.
In other words, if the number of generated values within the collection is large
then the generated items will tend to be less deep to avoid creating structures a lot
larger than expected.
For the moment, the depth is not taken into account to compute the number of items to
define for a precise generate call of the array. Just applied onto eligible items.
##### Remarks
Since 2.25.0
***
#### maxLength? {#maxlength}
> `optional` **maxLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/array.ts:27](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/array.ts#L27)
Upper bound of the generated array size
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 2.4.0
***
#### minLength? {#minlength}
> `optional` **minLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/array.ts:21](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/array.ts#L21)
Lower bound of the generated array size
##### Default Value
```ts
0
```
##### Remarks
Since 2.4.0
***
#### size? {#size}
> `optional` **size?**: [`SizeForArbitrary`](../type-aliases/SizeForArbitrary.md)
Defined in: [packages/fast-check/src/arbitrary/array.ts:37](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/array.ts#L37)
Define how large the generated values should be (at max)
When used in conjonction with `maxLength`, `size` will be used to define
the upper bound of the generated array size while `maxLength` will be used
to define and document the general maximal length allowed for this case.
##### Remarks
Since 2.22.0
---
## Interface: AsyncCommand\
Defined in: [packages/fast-check/src/check/model/command/AsyncCommand.ts:10](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/command/AsyncCommand.ts#L10)
Interface that should be implemented in order to define
an asynchronous command
### Remarks
Since 1.5.0
### Extends
- [`ICommand`](ICommand.md)\<`Model`, `Real`, `Promise`\<`void`\>, `CheckAsync`\>
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `Model` *extends* `object` | - |
| `Real` | - |
| `CheckAsync` *extends* `boolean` | `false` |
### Methods
#### check() {#check}
> **check**(`m`): `CheckAsync` *extends* `false` ? `boolean` : `Promise`\<`boolean`\>
Defined in: [packages/fast-check/src/check/model/command/ICommand.ts:21](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/command/ICommand.ts#L21)
Check if the model is in the right state to apply the command
WARNING: does not change the model
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `m` | `Readonly`\<`Model`\> | Model, simplified or schematic representation of real system |
##### Returns
`CheckAsync` *extends* `false` ? `boolean` : `Promise`\<`boolean`\>
##### Remarks
Since 1.5.0
##### Inherited from
[`ICommand`](ICommand.md).[`check`](ICommand.md#check)
***
#### run() {#run}
> **run**(`m`, `r`): `Promise`
Defined in: [packages/fast-check/src/check/model/command/ICommand.ts:33](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/command/ICommand.ts#L33)
Receive the non-updated model and the real or system under test.
Perform the checks post-execution - Throw in case of invalid state.
Update the model accordingly
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `m` | `Model` | Model, simplified or schematic representation of real system |
| `r` | `Real` | Sytem under test |
##### Returns
`Promise`
##### Remarks
Since 1.5.0
##### Inherited from
[`ICommand`](ICommand.md).[`run`](ICommand.md#run)
***
#### toString() {#tostring}
> **toString**(): `string`
Defined in: [packages/fast-check/src/check/model/command/ICommand.ts:39](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/command/ICommand.ts#L39)
Name of the command
##### Returns
`string`
##### Remarks
Since 1.5.0
##### Inherited from
[`ICommand`](ICommand.md).[`toString`](ICommand.md#tostring)
---
## Interface: BigIntConstraints
Defined in: [packages/fast-check/src/arbitrary/bigInt.ts:10](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/bigInt.ts#L10)
Constraints to be applied on [bigInt](../functions/bigInt.md)
### Remarks
Since 2.6.0
### Properties
#### max? {#max}
> `optional` **max?**: `bigint`
Defined in: [packages/fast-check/src/arbitrary/bigInt.ts:20](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/bigInt.ts#L20)
Upper bound for the generated bigints (eg.: -2n, 2147483647n, BigInt(Number.MAX_SAFE_INTEGER))
##### Remarks
Since 2.6.0
***
#### min? {#min}
> `optional` **min?**: `bigint`
Defined in: [packages/fast-check/src/arbitrary/bigInt.ts:15](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/bigInt.ts#L15)
Lower bound for the generated bigints (eg.: -5n, 0n, BigInt(Number.MIN_SAFE_INTEGER))
##### Remarks
Since 2.6.0
---
## Interface: Command\
Defined in: [packages/fast-check/src/check/model/command/Command.ts:10](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/command/Command.ts#L10)
Interface that should be implemented in order to define
a synchronous command
### Remarks
Since 1.5.0
### Extends
- [`ICommand`](ICommand.md)\<`Model`, `Real`, `void`\>
### Type Parameters
| Type Parameter |
| ------ |
| `Model` *extends* `object` |
| `Real` |
### Methods
#### check() {#check}
> **check**(`m`): `boolean`
Defined in: [packages/fast-check/src/check/model/command/ICommand.ts:21](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/command/ICommand.ts#L21)
Check if the model is in the right state to apply the command
WARNING: does not change the model
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `m` | `Readonly`\<`Model`\> | Model, simplified or schematic representation of real system |
##### Returns
`boolean`
##### Remarks
Since 1.5.0
##### Inherited from
[`ICommand`](ICommand.md).[`check`](ICommand.md#check)
***
#### run() {#run}
> **run**(`m`, `r`): `void`
Defined in: [packages/fast-check/src/check/model/command/ICommand.ts:33](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/command/ICommand.ts#L33)
Receive the non-updated model and the real or system under test.
Perform the checks post-execution - Throw in case of invalid state.
Update the model accordingly
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `m` | `Model` | Model, simplified or schematic representation of real system |
| `r` | `Real` | Sytem under test |
##### Returns
`void`
##### Remarks
Since 1.5.0
##### Inherited from
[`ICommand`](ICommand.md).[`run`](ICommand.md#run)
***
#### toString() {#tostring}
> **toString**(): `string`
Defined in: [packages/fast-check/src/check/model/command/ICommand.ts:39](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/command/ICommand.ts#L39)
Name of the command
##### Returns
`string`
##### Remarks
Since 1.5.0
##### Inherited from
[`ICommand`](ICommand.md).[`toString`](ICommand.md#tostring)
---
## Interface: CommandsContraints
Defined in: [packages/fast-check/src/check/model/commands/CommandsContraints.ts:8](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/commands/CommandsContraints.ts#L8)
Parameters for [commands](../functions/commands.md)
### Remarks
Since 2.2.0
### Properties
#### disableReplayLog? {#disablereplaylog}
> `optional` **disableReplayLog?**: `boolean`
Defined in: [packages/fast-check/src/check/model/commands/CommandsContraints.ts:28](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/commands/CommandsContraints.ts#L28)
Do not show replayPath in the output
##### Default Value
```ts
false
```
##### Remarks
Since 1.11.0
***
#### maxCommands? {#maxcommands}
> `optional` **maxCommands?**: `number`
Defined in: [packages/fast-check/src/check/model/commands/CommandsContraints.ts:17](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/commands/CommandsContraints.ts#L17)
Maximal number of commands to generate per run
You probably want to use `size` instead.
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 1.11.0
***
#### replayPath? {#replaypath}
> `optional` **replayPath?**: `string`
Defined in: [packages/fast-check/src/check/model/commands/CommandsContraints.ts:36](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/commands/CommandsContraints.ts#L36)
Hint for replay purposes only
Should be used in conjonction with `{ seed, path }` of [assert](../functions/assert.md)
##### Remarks
Since 1.11.0
***
#### size? {#size}
> `optional` **size?**: [`SizeForArbitrary`](../type-aliases/SizeForArbitrary.md)
Defined in: [packages/fast-check/src/check/model/commands/CommandsContraints.ts:22](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/commands/CommandsContraints.ts#L22)
Define how large the generated values (number of commands) should be (at max)
##### Remarks
Since 2.22.0
---
## Interface: ContextValue
Defined in: [packages/fast-check/src/arbitrary/context.ts:10](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/context.ts#L10)
Execution context attached to one predicate run
### Remarks
Since 2.2.0
### Methods
#### log() {#log}
> **log**(`data`): `void`
Defined in: [packages/fast-check/src/arbitrary/context.ts:17](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/context.ts#L17)
Log execution details during a test.
Very helpful when troubleshooting failures
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `data` | `string` | Data to be logged into the current context |
##### Returns
`void`
##### Remarks
Since 1.8.0
***
#### size() {#size}
> **size**(): `number`
Defined in: [packages/fast-check/src/arbitrary/context.ts:22](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/context.ts#L22)
Number of logs already logged into current context
##### Returns
`number`
##### Remarks
Since 1.8.0
---
## Interface: DateConstraints
Defined in: [packages/fast-check/src/arbitrary/date.ts:18](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/date.ts#L18)
Constraints to be applied on [date](../functions/date.md)
### Remarks
Since 3.3.0
### Properties
#### max? {#max}
> `optional` **max?**: `Date`
Defined in: [packages/fast-check/src/arbitrary/date.ts:30](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/date.ts#L30)
Upper bound of the range (included)
##### Default Value
```ts
new Date(8640000000000000)
```
##### Remarks
Since 1.17.0
***
#### min? {#min}
> `optional` **min?**: `Date`
Defined in: [packages/fast-check/src/arbitrary/date.ts:24](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/date.ts#L24)
Lower bound of the range (included)
##### Default Value
```ts
new Date(-8640000000000000)
```
##### Remarks
Since 1.17.0
***
#### noInvalidDate? {#noinvaliddate}
> `optional` **noInvalidDate?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/date.ts:36](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/date.ts#L36)
When set to true, no more "Invalid Date" can be generated.
##### Default Value
```ts
false
```
##### Remarks
Since 3.13.0
---
## Interface: DictionaryConstraints
Defined in: [packages/fast-check/src/arbitrary/dictionary.ts:23](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/dictionary.ts#L23)
Constraints to be applied on [dictionary](../functions/dictionary.md)
### Remarks
Since 2.22.0
### Properties
#### depthIdentifier? {#depthidentifier}
> `optional` **depthIdentifier?**: `string` \| [`DepthIdentifier`](../type-aliases/DepthIdentifier.md)
Defined in: [packages/fast-check/src/arbitrary/dictionary.ts:49](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/dictionary.ts#L49)
Depth identifier can be used to share the current depth between several instances.
By default, if not specified, each instance of dictionary will have its own depth.
In other words: you can have depth=1 in one while you have depth=100 in another one.
##### Remarks
Since 3.15.0
***
#### maxKeys? {#maxkeys}
> `optional` **maxKeys?**: `number`
Defined in: [packages/fast-check/src/arbitrary/dictionary.ts:35](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/dictionary.ts#L35)
Upper bound for the number of keys defined into the generated instance
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 2.22.0
***
#### minKeys? {#minkeys}
> `optional` **minKeys?**: `number`
Defined in: [packages/fast-check/src/arbitrary/dictionary.ts:29](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/dictionary.ts#L29)
Lower bound for the number of keys defined into the generated instance
##### Default Value
```ts
0
```
##### Remarks
Since 2.22.0
***
#### noNullPrototype? {#nonullprototype}
> `optional` **noNullPrototype?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/dictionary.ts:55](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/dictionary.ts#L55)
Do not generate objects with null prototype
##### Default Value
```ts
false
```
##### Remarks
Since 3.13.0
***
#### size? {#size}
> `optional` **size?**: [`SizeForArbitrary`](../type-aliases/SizeForArbitrary.md)
Defined in: [packages/fast-check/src/arbitrary/dictionary.ts:40](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/dictionary.ts#L40)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
---
## Interface: DomainConstraints
Defined in: [packages/fast-check/src/arbitrary/domain.ts:93](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/domain.ts#L93)
Constraints to be applied on [domain](../functions/domain.md)
### Remarks
Since 2.22.0
### Properties
#### size? {#size}
> `optional` **size?**: `RelativeSize` \| [`Size`](../type-aliases/Size.md)
Defined in: [packages/fast-check/src/arbitrary/domain.ts:98](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/domain.ts#L98)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
---
## Interface: DoubleConstraints
Defined in: [packages/fast-check/src/arbitrary/double.ts:24](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/double.ts#L24)
Constraints to be applied on [double](../functions/double.md)
### Remarks
Since 2.6.0
### Properties
#### max? {#max}
> `optional` **max?**: `number`
Defined in: [packages/fast-check/src/arbitrary/double.ts:43](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/double.ts#L43)
Upper bound for the generated 64-bit floats (included, see maxExcluded to exclude it)
##### Default Value
```ts
Number.POSITIVE_INFINITY, 1.7976931348623157e+308 when noDefaultInfinity is true
```
##### Remarks
Since 2.8.0
***
#### maxExcluded? {#maxexcluded}
> `optional` **maxExcluded?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/double.ts:50](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/double.ts#L50)
Should the upper bound (aka max) be excluded?
Note: Excluding max=Number.POSITIVE_INFINITY would result into having max set to Number.MAX_VALUE.
##### Default Value
```ts
false
```
##### Remarks
Since 3.12.0
***
#### min? {#min}
> `optional` **min?**: `number`
Defined in: [packages/fast-check/src/arbitrary/double.ts:30](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/double.ts#L30)
Lower bound for the generated 64-bit floats (included, see minExcluded to exclude it)
##### Default Value
```ts
Number.NEGATIVE_INFINITY, -1.7976931348623157e+308 when noDefaultInfinity is true
```
##### Remarks
Since 2.8.0
***
#### minExcluded? {#minexcluded}
> `optional` **minExcluded?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/double.ts:37](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/double.ts#L37)
Should the lower bound (aka min) be excluded?
Note: Excluding min=Number.NEGATIVE_INFINITY would result into having min set to -Number.MAX_VALUE.
##### Default Value
```ts
false
```
##### Remarks
Since 3.12.0
***
#### noDefaultInfinity? {#nodefaultinfinity}
> `optional` **noDefaultInfinity?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/double.ts:57](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/double.ts#L57)
By default, lower and upper bounds are -infinity and +infinity.
By setting noDefaultInfinity to true, you move those defaults to minimal and maximal finite values.
##### Default Value
```ts
false
```
##### Remarks
Since 2.8.0
***
#### noInteger? {#nointeger}
> `optional` **noInteger?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/double.ts:70](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/double.ts#L70)
When set to true, Number.isInteger(value) will be false for any generated value.
Note: -infinity and +infinity, or NaN can stil be generated except if you rejected them via another constraint.
##### Default Value
```ts
false
```
##### Remarks
Since 3.18.0
***
#### noNaN? {#nonan}
> `optional` **noNaN?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/double.ts:63](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/double.ts#L63)
When set to true, no more Number.NaN can be generated.
##### Default Value
```ts
false
```
##### Remarks
Since 2.8.0
---
## Interface: EmailAddressConstraints
Defined in: [packages/fast-check/src/arbitrary/emailAddress.ts:53](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/emailAddress.ts#L53)
Constraints to be applied on [emailAddress](../functions/emailAddress.md)
### Remarks
Since 2.22.0
### Properties
#### size? {#size}
> `optional` **size?**: `RelativeSize` \| [`Size`](../type-aliases/Size.md)
Defined in: [packages/fast-check/src/arbitrary/emailAddress.ts:58](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/emailAddress.ts#L58)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
---
## Interface: ExecutionTree\
Defined in: [packages/fast-check/src/check/runner/reporter/ExecutionTree.ts:8](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/ExecutionTree.ts#L8)
Summary of the execution process
### Remarks
Since 1.9.0
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Properties
#### children {#children}
> **children**: `ExecutionTree`\<`Ts`\>[]
Defined in: [packages/fast-check/src/check/runner/reporter/ExecutionTree.ts:25](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/ExecutionTree.ts#L25)
Values derived from this value
##### Remarks
Since 1.9.0
***
#### status {#status}
> **status**: [`ExecutionStatus`](../enumerations/ExecutionStatus.md)
Defined in: [packages/fast-check/src/check/runner/reporter/ExecutionTree.ts:13](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/ExecutionTree.ts#L13)
Status of the property
##### Remarks
Since 1.9.0
***
#### value {#value}
> **value**: `Ts`
Defined in: [packages/fast-check/src/check/runner/reporter/ExecutionTree.ts:19](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/ExecutionTree.ts#L19)
Generated value
##### Remarks
Since 1.9.0
---
## Interface: FalsyContraints
Defined in: [packages/fast-check/src/arbitrary/falsy.ts:10](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/falsy.ts#L10)
Constraints to be applied on [falsy](../functions/falsy.md)
### Remarks
Since 1.26.0
### Properties
#### withBigInt? {#withbigint}
> `optional` **withBigInt?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/falsy.ts:15](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/falsy.ts#L15)
Enable falsy bigint value
##### Remarks
Since 1.26.0
---
## Interface: FloatConstraints
Defined in: [packages/fast-check/src/arbitrary/float.ts:23](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/float.ts#L23)
Constraints to be applied on [float](../functions/float.md)
### Remarks
Since 2.6.0
### Properties
#### max? {#max}
> `optional` **max?**: `number`
Defined in: [packages/fast-check/src/arbitrary/float.ts:42](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/float.ts#L42)
Upper bound for the generated 32-bit floats (included)
##### Default Value
```ts
Number.POSITIVE_INFINITY, 3.4028234663852886e+38 when noDefaultInfinity is true
```
##### Remarks
Since 2.8.0
***
#### maxExcluded? {#maxexcluded}
> `optional` **maxExcluded?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/float.ts:49](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/float.ts#L49)
Should the upper bound (aka max) be excluded?
Note: Excluding max=Number.POSITIVE_INFINITY would result into having max set to 3.4028234663852886e+38.
##### Default Value
```ts
false
```
##### Remarks
Since 3.12.0
***
#### min? {#min}
> `optional` **min?**: `number`
Defined in: [packages/fast-check/src/arbitrary/float.ts:29](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/float.ts#L29)
Lower bound for the generated 32-bit floats (included)
##### Default Value
```ts
Number.NEGATIVE_INFINITY, -3.4028234663852886e+38 when noDefaultInfinity is true
```
##### Remarks
Since 2.8.0
***
#### minExcluded? {#minexcluded}
> `optional` **minExcluded?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/float.ts:36](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/float.ts#L36)
Should the lower bound (aka min) be excluded?
Note: Excluding min=Number.NEGATIVE_INFINITY would result into having min set to -3.4028234663852886e+38.
##### Default Value
```ts
false
```
##### Remarks
Since 3.12.0
***
#### noDefaultInfinity? {#nodefaultinfinity}
> `optional` **noDefaultInfinity?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/float.ts:56](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/float.ts#L56)
By default, lower and upper bounds are -infinity and +infinity.
By setting noDefaultInfinity to true, you move those defaults to minimal and maximal finite values.
##### Default Value
```ts
false
```
##### Remarks
Since 2.8.0
***
#### noInteger? {#nointeger}
> `optional` **noInteger?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/float.ts:69](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/float.ts#L69)
When set to true, Number.isInteger(value) will be false for any generated value.
Note: -infinity and +infinity, or NaN can stil be generated except if you rejected them via another constraint.
##### Default Value
```ts
false
```
##### Remarks
Since 3.18.0
***
#### noNaN? {#nonan}
> `optional` **noNaN?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/float.ts:62](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/float.ts#L62)
When set to true, no more Number.NaN can be generated.
##### Default Value
```ts
false
```
##### Remarks
Since 2.8.0
---
## Interface: IAsyncProperty\
Defined in: [packages/fast-check/src/check/property/AsyncProperty.generic.ts:33](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/AsyncProperty.generic.ts#L33)
Interface for asynchronous property, see [IRawProperty](IRawProperty.md)
### Remarks
Since 1.19.0
### Extends
- [`IRawProperty`](IRawProperty.md)\<`Ts`, `true`\>
### Extended by
- [`IAsyncPropertyWithHooks`](IAsyncPropertyWithHooks.md)
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Properties
#### runAfterEach {#runaftereach}
> **runAfterEach**: () => `Promise`\<`void`\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:81](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L81)
Run after each hook
##### Returns
`Promise`\<`void`\>
##### Remarks
Since 3.4.0
##### Inherited from
[`IRawProperty`](IRawProperty.md).[`runAfterEach`](IRawProperty.md#runaftereach)
***
#### runBeforeEach {#runbeforeeach}
> **runBeforeEach**: () => `Promise`\<`void`\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:75](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L75)
Run before each hook
##### Returns
`Promise`\<`void`\>
##### Remarks
Since 3.4.0
##### Inherited from
[`IRawProperty`](IRawProperty.md).[`runBeforeEach`](IRawProperty.md#runbeforeeach)
### Methods
#### generate() {#generate}
> **generate**(`mrng`, `runId?`): [`Value`](../classes/Value.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:49](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L49)
Generate values of type Ts
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `mrng` | [`Random`](../classes/Random.md) | Random number generator |
| `runId?` | `number` | Id of the generation, starting at 0 - if set the generation might be biased |
##### Returns
[`Value`](../classes/Value.md)\<`Ts`\>
##### Remarks
Since 0.0.7 (return type changed in 3.0.0)
##### Inherited from
[`IRawProperty`](IRawProperty.md).[`generate`](IRawProperty.md#generate)
***
#### isAsync() {#isasync}
> **isAsync**(): `true`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:39](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L39)
Is the property asynchronous?
true in case of asynchronous property, false otherwise
##### Returns
`true`
##### Remarks
Since 0.0.7
##### Inherited from
[`IRawProperty`](IRawProperty.md).[`isAsync`](IRawProperty.md#isasync-1)
***
#### run() {#run}
> **run**(`v`): `Promise`\<[`PreconditionFailure`](../classes/PreconditionFailure.md) \| [`PropertyFailure`](../type-aliases/PropertyFailure.md) \| `null`\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:65](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L65)
Check the predicate for v
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `v` | `Ts` | Value of which we want to check the predicate |
##### Returns
`Promise`\<[`PreconditionFailure`](../classes/PreconditionFailure.md) \| [`PropertyFailure`](../type-aliases/PropertyFailure.md) \| `null`\>
##### Remarks
Since 0.0.7
##### Inherited from
[`IRawProperty`](IRawProperty.md).[`run`](IRawProperty.md#run)
***
#### shrink() {#shrink}
> **shrink**(`value`): [`Stream`](../classes/Stream.md)\<[`Value`](../classes/Value.md)\<`Ts`\>\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:58](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L58)
Shrink value of type Ts
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value` | [`Value`](../classes/Value.md)\<`Ts`\> | The value to be shrunk, it can be context-less |
##### Returns
[`Stream`](../classes/Stream.md)\<[`Value`](../classes/Value.md)\<`Ts`\>\>
##### Remarks
Since 3.0.0
##### Inherited from
[`IRawProperty`](IRawProperty.md).[`shrink`](IRawProperty.md#shrink)
---
## Interface: IAsyncPropertyWithHooks\
Defined in: [packages/fast-check/src/check/property/AsyncProperty.generic.ts:40](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/AsyncProperty.generic.ts#L40)
Interface for asynchronous property defining hooks, see [IAsyncProperty](IAsyncProperty.md)
### Remarks
Since 2.2.0
### Extends
- [`IAsyncProperty`](IAsyncProperty.md)\<`Ts`\>
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Properties
#### runAfterEach {#runaftereach}
> **runAfterEach**: () => `Promise`\<`void`\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:81](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L81)
Run after each hook
##### Returns
`Promise`\<`void`\>
##### Remarks
Since 3.4.0
##### Inherited from
[`IAsyncProperty`](IAsyncProperty.md).[`runAfterEach`](IAsyncProperty.md#runaftereach)
***
#### runBeforeEach {#runbeforeeach}
> **runBeforeEach**: () => `Promise`\<`void`\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:75](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L75)
Run before each hook
##### Returns
`Promise`\<`void`\>
##### Remarks
Since 3.4.0
##### Inherited from
[`IAsyncProperty`](IAsyncProperty.md).[`runBeforeEach`](IAsyncProperty.md#runbeforeeach)
### Methods
#### ~~afterEach()~~ {#aftereach}
> **afterEach**(`hookFunction`): `IAsyncPropertyWithHooks`\<`Ts`\>
Defined in: [packages/fast-check/src/check/property/AsyncProperty.generic.ts:55](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/AsyncProperty.generic.ts#L55)
Define a function that should be called after all calls to the predicate
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `hookFunction` | [`AsyncPropertyHookFunction`](../type-aliases/AsyncPropertyHookFunction.md) | Function to be called |
##### Returns
`IAsyncPropertyWithHooks`\<`Ts`\>
##### Deprecated
Prefer the life-cycle plugins: `fc.assert(property, { plugins: [fc.afterEach(fn)] })`
##### Remarks
Since 1.6.0
***
#### ~~beforeEach()~~ {#beforeeach}
> **beforeEach**(`hookFunction`): `IAsyncPropertyWithHooks`\<`Ts`\>
Defined in: [packages/fast-check/src/check/property/AsyncProperty.generic.ts:47](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/AsyncProperty.generic.ts#L47)
Define a function that should be called before all calls to the predicate
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `hookFunction` | [`AsyncPropertyHookFunction`](../type-aliases/AsyncPropertyHookFunction.md) | Function to be called |
##### Returns
`IAsyncPropertyWithHooks`\<`Ts`\>
##### Deprecated
Prefer the life-cycle plugins: `fc.assert(property, { plugins: [fc.beforeEach(fn)] })`
##### Remarks
Since 1.6.0
***
#### generate() {#generate}
> **generate**(`mrng`, `runId?`): [`Value`](../classes/Value.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:49](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L49)
Generate values of type Ts
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `mrng` | [`Random`](../classes/Random.md) | Random number generator |
| `runId?` | `number` | Id of the generation, starting at 0 - if set the generation might be biased |
##### Returns
[`Value`](../classes/Value.md)\<`Ts`\>
##### Remarks
Since 0.0.7 (return type changed in 3.0.0)
##### Inherited from
[`IAsyncProperty`](IAsyncProperty.md).[`generate`](IAsyncProperty.md#generate)
***
#### isAsync() {#isasync}
> **isAsync**(): `true`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:39](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L39)
Is the property asynchronous?
true in case of asynchronous property, false otherwise
##### Returns
`true`
##### Remarks
Since 0.0.7
##### Inherited from
[`IAsyncProperty`](IAsyncProperty.md).[`isAsync`](IAsyncProperty.md#isasync)
***
#### run() {#run}
> **run**(`v`): `Promise`\<[`PreconditionFailure`](../classes/PreconditionFailure.md) \| [`PropertyFailure`](../type-aliases/PropertyFailure.md) \| `null`\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:65](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L65)
Check the predicate for v
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `v` | `Ts` | Value of which we want to check the predicate |
##### Returns
`Promise`\<[`PreconditionFailure`](../classes/PreconditionFailure.md) \| [`PropertyFailure`](../type-aliases/PropertyFailure.md) \| `null`\>
##### Remarks
Since 0.0.7
##### Inherited from
[`IAsyncProperty`](IAsyncProperty.md).[`run`](IAsyncProperty.md#run)
***
#### shrink() {#shrink}
> **shrink**(`value`): [`Stream`](../classes/Stream.md)\<[`Value`](../classes/Value.md)\<`Ts`\>\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:58](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L58)
Shrink value of type Ts
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value` | [`Value`](../classes/Value.md)\<`Ts`\> | The value to be shrunk, it can be context-less |
##### Returns
[`Stream`](../classes/Stream.md)\<[`Value`](../classes/Value.md)\<`Ts`\>\>
##### Remarks
Since 3.0.0
##### Inherited from
[`IAsyncProperty`](IAsyncProperty.md).[`shrink`](IAsyncProperty.md#shrink)
---
## Interface: ICommand\
Defined in: [packages/fast-check/src/check/model/command/ICommand.ts:11](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/command/ICommand.ts#L11)
Interface that should be implemented in order to define a command
### Remarks
Since 1.5.0
### Extended by
- [`AsyncCommand`](AsyncCommand.md)
- [`Command`](Command.md)
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `Model` *extends* `object` | - |
| `Real` | - |
| `RunResult` | - |
| `CheckAsync` *extends* `boolean` | `false` |
### Methods
#### check() {#check}
> **check**(`m`): `CheckAsync` *extends* `false` ? `boolean` : `Promise`\<`boolean`\>
Defined in: [packages/fast-check/src/check/model/command/ICommand.ts:21](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/command/ICommand.ts#L21)
Check if the model is in the right state to apply the command
WARNING: does not change the model
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `m` | `Readonly`\<`Model`\> | Model, simplified or schematic representation of real system |
##### Returns
`CheckAsync` *extends* `false` ? `boolean` : `Promise`\<`boolean`\>
##### Remarks
Since 1.5.0
***
#### run() {#run}
> **run**(`m`, `r`): `RunResult`
Defined in: [packages/fast-check/src/check/model/command/ICommand.ts:33](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/command/ICommand.ts#L33)
Receive the non-updated model and the real or system under test.
Perform the checks post-execution - Throw in case of invalid state.
Update the model accordingly
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `m` | `Model` | Model, simplified or schematic representation of real system |
| `r` | `Real` | Sytem under test |
##### Returns
`RunResult`
##### Remarks
Since 1.5.0
***
#### toString() {#tostring}
> **toString**(): `string`
Defined in: [packages/fast-check/src/check/model/command/ICommand.ts:39](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/command/ICommand.ts#L39)
Name of the command
##### Returns
`string`
##### Remarks
Since 1.5.0
---
## Interface: IProperty\
Defined in: [packages/fast-check/src/check/property/Property.generic.ts:31](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/Property.generic.ts#L31)
Interface for synchronous property, see [IRawProperty](IRawProperty.md)
### Remarks
Since 1.19.0
### Extends
- [`IRawProperty`](IRawProperty.md)\<`Ts`, `false`\>
### Extended by
- [`IPropertyWithHooks`](IPropertyWithHooks.md)
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Properties
#### runAfterEach {#runaftereach}
> **runAfterEach**: () => `void`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:81](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L81)
Run after each hook
##### Returns
`void`
##### Remarks
Since 3.4.0
##### Inherited from
[`IRawProperty`](IRawProperty.md).[`runAfterEach`](IRawProperty.md#runaftereach)
***
#### runBeforeEach {#runbeforeeach}
> **runBeforeEach**: () => `void`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:75](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L75)
Run before each hook
##### Returns
`void`
##### Remarks
Since 3.4.0
##### Inherited from
[`IRawProperty`](IRawProperty.md).[`runBeforeEach`](IRawProperty.md#runbeforeeach)
### Methods
#### generate() {#generate}
> **generate**(`mrng`, `runId?`): [`Value`](../classes/Value.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:49](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L49)
Generate values of type Ts
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `mrng` | [`Random`](../classes/Random.md) | Random number generator |
| `runId?` | `number` | Id of the generation, starting at 0 - if set the generation might be biased |
##### Returns
[`Value`](../classes/Value.md)\<`Ts`\>
##### Remarks
Since 0.0.7 (return type changed in 3.0.0)
##### Inherited from
[`IRawProperty`](IRawProperty.md).[`generate`](IRawProperty.md#generate)
***
#### isAsync() {#isasync}
> **isAsync**(): `false`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:39](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L39)
Is the property asynchronous?
true in case of asynchronous property, false otherwise
##### Returns
`false`
##### Remarks
Since 0.0.7
##### Inherited from
[`IRawProperty`](IRawProperty.md).[`isAsync`](IRawProperty.md#isasync-1)
***
#### run() {#run}
> **run**(`v`): [`PreconditionFailure`](../classes/PreconditionFailure.md) \| [`PropertyFailure`](../type-aliases/PropertyFailure.md) \| `null`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:65](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L65)
Check the predicate for v
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `v` | `Ts` | Value of which we want to check the predicate |
##### Returns
[`PreconditionFailure`](../classes/PreconditionFailure.md) \| [`PropertyFailure`](../type-aliases/PropertyFailure.md) \| `null`
##### Remarks
Since 0.0.7
##### Inherited from
[`IRawProperty`](IRawProperty.md).[`run`](IRawProperty.md#run)
***
#### shrink() {#shrink}
> **shrink**(`value`): [`Stream`](../classes/Stream.md)\<[`Value`](../classes/Value.md)\<`Ts`\>\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:58](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L58)
Shrink value of type Ts
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value` | [`Value`](../classes/Value.md)\<`Ts`\> | The value to be shrunk, it can be context-less |
##### Returns
[`Stream`](../classes/Stream.md)\<[`Value`](../classes/Value.md)\<`Ts`\>\>
##### Remarks
Since 3.0.0
##### Inherited from
[`IRawProperty`](IRawProperty.md).[`shrink`](IRawProperty.md#shrink)
---
## Interface: IPropertyWithHooks\
Defined in: [packages/fast-check/src/check/property/Property.generic.ts:38](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/Property.generic.ts#L38)
Interface for synchronous property defining hooks, see [IProperty](IProperty.md)
### Remarks
Since 2.2.0
### Extends
- [`IProperty`](IProperty.md)\<`Ts`\>
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Properties
#### runAfterEach {#runaftereach}
> **runAfterEach**: () => `void`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:81](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L81)
Run after each hook
##### Returns
`void`
##### Remarks
Since 3.4.0
##### Inherited from
[`IProperty`](IProperty.md).[`runAfterEach`](IProperty.md#runaftereach)
***
#### runBeforeEach {#runbeforeeach}
> **runBeforeEach**: () => `void`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:75](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L75)
Run before each hook
##### Returns
`void`
##### Remarks
Since 3.4.0
##### Inherited from
[`IProperty`](IProperty.md).[`runBeforeEach`](IProperty.md#runbeforeeach)
### Methods
#### ~~afterEach()~~ {#aftereach}
##### Call Signature
> **afterEach**(`invalidHookFunction`): `"afterEach expects a synchronous function but was given a function returning a Promise"`
Defined in: [packages/fast-check/src/check/property/Property.generic.ts:63](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/Property.generic.ts#L63)
Define a function that should be called after all calls to the predicate
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `invalidHookFunction` | (`hookFunction`) => `Promise`\<`unknown`\> | Function to be called, please provide a valid hook function |
###### Returns
`"afterEach expects a synchronous function but was given a function returning a Promise"`
###### Deprecated
Prefer the life-cycle plugins: `fc.assert(property, { plugins: [fc.afterEach(fn)] })`
###### Remarks
Since 1.6.0
##### Call Signature
> **afterEach**(`hookFunction`): `IPropertyWithHooks`\<`Ts`\>
Defined in: [packages/fast-check/src/check/property/Property.generic.ts:72](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/Property.generic.ts#L72)
Define a function that should be called after all calls to the predicate
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `hookFunction` | [`PropertyHookFunction`](../type-aliases/PropertyHookFunction.md) | Function to be called |
###### Returns
`IPropertyWithHooks`\<`Ts`\>
###### Deprecated
Prefer the life-cycle plugins: `fc.assert(property, { plugins: [fc.afterEach(fn)] })`
###### Remarks
Since 1.6.0
***
#### ~~beforeEach()~~ {#beforeeach}
##### Call Signature
> **beforeEach**(`invalidHookFunction`): `"beforeEach expects a synchronous function but was given a function returning a Promise"`
Defined in: [packages/fast-check/src/check/property/Property.generic.ts:45](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/Property.generic.ts#L45)
Define a function that should be called before all calls to the predicate
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `invalidHookFunction` | (`hookFunction`) => `Promise`\<`unknown`\> | Function to be called, please provide a valid hook function |
###### Returns
`"beforeEach expects a synchronous function but was given a function returning a Promise"`
###### Deprecated
Prefer the life-cycle plugins: `fc.assert(property, { plugins: [fc.beforeEach(fn)] })`
###### Remarks
Since 1.6.0
##### Call Signature
> **beforeEach**(`hookFunction`): `IPropertyWithHooks`\<`Ts`\>
Defined in: [packages/fast-check/src/check/property/Property.generic.ts:55](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/Property.generic.ts#L55)
Define a function that should be called before all calls to the predicate
###### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `hookFunction` | [`PropertyHookFunction`](../type-aliases/PropertyHookFunction.md) | Function to be called |
###### Returns
`IPropertyWithHooks`\<`Ts`\>
###### Deprecated
Prefer the life-cycle plugins: `fc.assert(property, { plugins: [fc.beforeEach(fn)] })`
###### Remarks
Since 1.6.0
***
#### generate() {#generate}
> **generate**(`mrng`, `runId?`): [`Value`](../classes/Value.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:49](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L49)
Generate values of type Ts
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `mrng` | [`Random`](../classes/Random.md) | Random number generator |
| `runId?` | `number` | Id of the generation, starting at 0 - if set the generation might be biased |
##### Returns
[`Value`](../classes/Value.md)\<`Ts`\>
##### Remarks
Since 0.0.7 (return type changed in 3.0.0)
##### Inherited from
[`IProperty`](IProperty.md).[`generate`](IProperty.md#generate)
***
#### isAsync() {#isasync}
> **isAsync**(): `false`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:39](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L39)
Is the property asynchronous?
true in case of asynchronous property, false otherwise
##### Returns
`false`
##### Remarks
Since 0.0.7
##### Inherited from
[`IProperty`](IProperty.md).[`isAsync`](IProperty.md#isasync)
***
#### run() {#run}
> **run**(`v`): [`PreconditionFailure`](../classes/PreconditionFailure.md) \| [`PropertyFailure`](../type-aliases/PropertyFailure.md) \| `null`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:65](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L65)
Check the predicate for v
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `v` | `Ts` | Value of which we want to check the predicate |
##### Returns
[`PreconditionFailure`](../classes/PreconditionFailure.md) \| [`PropertyFailure`](../type-aliases/PropertyFailure.md) \| `null`
##### Remarks
Since 0.0.7
##### Inherited from
[`IProperty`](IProperty.md).[`run`](IProperty.md#run)
***
#### shrink() {#shrink}
> **shrink**(`value`): [`Stream`](../classes/Stream.md)\<[`Value`](../classes/Value.md)\<`Ts`\>\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:58](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L58)
Shrink value of type Ts
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value` | [`Value`](../classes/Value.md)\<`Ts`\> | The value to be shrunk, it can be context-less |
##### Returns
[`Stream`](../classes/Stream.md)\<[`Value`](../classes/Value.md)\<`Ts`\>\>
##### Remarks
Since 3.0.0
##### Inherited from
[`IProperty`](IProperty.md).[`shrink`](IProperty.md#shrink)
---
## Interface: IRawProperty\
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:32](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L32)
Property
A property is the combination of:
- Arbitraries: how to generate the inputs for the algorithm
- Predicate: how to confirm the algorithm succeeded?
### Remarks
Since 1.19.0
### Extended by
- [`IProperty`](IProperty.md)
- [`IAsyncProperty`](IAsyncProperty.md)
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `Ts` | - |
| `IsAsync` *extends* `boolean` | `boolean` |
### Properties
#### runAfterEach {#runaftereach}
> **runAfterEach**: () => `IsAsync` *extends* `true` ? `Promise`\<`void`\> : `never` \| `IsAsync` *extends* `false` ? `void` : `never`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:81](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L81)
Run after each hook
##### Returns
`IsAsync` *extends* `true` ? `Promise`\<`void`\> : `never` \| `IsAsync` *extends* `false` ? `void` : `never`
##### Remarks
Since 3.4.0
***
#### runBeforeEach {#runbeforeeach}
> **runBeforeEach**: () => `IsAsync` *extends* `true` ? `Promise`\<`void`\> : `never` \| `IsAsync` *extends* `false` ? `void` : `never`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:75](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L75)
Run before each hook
##### Returns
`IsAsync` *extends* `true` ? `Promise`\<`void`\> : `never` \| `IsAsync` *extends* `false` ? `void` : `never`
##### Remarks
Since 3.4.0
### Methods
#### generate() {#generate}
> **generate**(`mrng`, `runId?`): [`Value`](../classes/Value.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:49](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L49)
Generate values of type Ts
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `mrng` | [`Random`](../classes/Random.md) | Random number generator |
| `runId?` | `number` | Id of the generation, starting at 0 - if set the generation might be biased |
##### Returns
[`Value`](../classes/Value.md)\<`Ts`\>
##### Remarks
Since 0.0.7 (return type changed in 3.0.0)
***
#### isAsync() {#isasync-1}
> **isAsync**(): `IsAsync`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:39](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L39)
Is the property asynchronous?
true in case of asynchronous property, false otherwise
##### Returns
`IsAsync`
##### Remarks
Since 0.0.7
***
#### run() {#run}
> **run**(`v`): `IsAsync` *extends* `true` ? `Promise`\<[`PreconditionFailure`](../classes/PreconditionFailure.md) \| [`PropertyFailure`](../type-aliases/PropertyFailure.md) \| `null`\> : `never` \| `IsAsync` *extends* `false` ? [`PreconditionFailure`](../classes/PreconditionFailure.md) \| [`PropertyFailure`](../type-aliases/PropertyFailure.md) \| `null` : `never`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:65](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L65)
Check the predicate for v
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `v` | `Ts` | Value of which we want to check the predicate |
##### Returns
`IsAsync` *extends* `true` ? `Promise`\<[`PreconditionFailure`](../classes/PreconditionFailure.md) \| [`PropertyFailure`](../type-aliases/PropertyFailure.md) \| `null`\> : `never` \| `IsAsync` *extends* `false` ? [`PreconditionFailure`](../classes/PreconditionFailure.md) \| [`PropertyFailure`](../type-aliases/PropertyFailure.md) \| `null` : `never`
##### Remarks
Since 0.0.7
***
#### shrink() {#shrink}
> **shrink**(`value`): [`Stream`](../classes/Stream.md)\<[`Value`](../classes/Value.md)\<`Ts`\>\>
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:58](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L58)
Shrink value of type Ts
##### Parameters
| Parameter | Type | Description |
| ------ | ------ | ------ |
| `value` | [`Value`](../classes/Value.md)\<`Ts`\> | The value to be shrunk, it can be context-less |
##### Returns
[`Stream`](../classes/Stream.md)\<[`Value`](../classes/Value.md)\<`Ts`\>\>
##### Remarks
Since 3.0.0
---
## Interface: IntegerConstraints
Defined in: [packages/fast-check/src/arbitrary/integer.ts:11](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/integer.ts#L11)
Constraints to be applied on [integer](../functions/integer.md)
### Remarks
Since 2.6.0
### Properties
#### max? {#max}
> `optional` **max?**: `number`
Defined in: [packages/fast-check/src/arbitrary/integer.ts:23](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/integer.ts#L23)
Upper bound for the generated integers (included)
##### Default Value
```ts
0x7fffffff
```
##### Remarks
Since 2.6.0
***
#### min? {#min}
> `optional` **min?**: `number`
Defined in: [packages/fast-check/src/arbitrary/integer.ts:17](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/integer.ts#L17)
Lower bound for the generated integers (included)
##### Default Value
```ts
-0x80000000
```
##### Remarks
Since 2.6.0
---
## Interface: JsonSharedConstraints
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/JsonConstraintsBuilder.ts:17](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/JsonConstraintsBuilder.ts#L17)
Shared constraints for:
- [json](../functions/json.md),
- [jsonValue](../functions/jsonValue.md),
### Remarks
Since 2.5.0
### Properties
#### depthSize? {#depthsize}
> `optional` **depthSize?**: [`DepthSize`](../type-aliases/DepthSize.md)
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/JsonConstraintsBuilder.ts:24](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/JsonConstraintsBuilder.ts#L24)
Limit the depth of the object by increasing the probability to generate simple values (defined via values)
as we go deeper in the object.
##### Remarks
Since 2.20.0
***
#### maxDepth? {#maxdepth}
> `optional` **maxDepth?**: `number`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/JsonConstraintsBuilder.ts:30](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/JsonConstraintsBuilder.ts#L30)
Maximal depth allowed
##### Default Value
Number.POSITIVE_INFINITY — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 2.5.0
***
#### ~~noUnicodeString?~~ {#nounicodestring}
> `optional` **noUnicodeString?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/JsonConstraintsBuilder.ts:37](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/JsonConstraintsBuilder.ts#L37)
Only generate instances having keys and values made of ascii strings (when true)
##### Deprecated
Prefer using `stringUnit` to customize the kind of strings that will be generated by default.
##### Default Value
```ts
true
```
##### Remarks
Since 3.19.0
***
#### stringUnit? {#stringunit}
> `optional` **stringUnit?**: `"grapheme"` \| `"grapheme-composite"` \| `"grapheme-ascii"` \| `"binary"` \| `"binary-ascii"` \| [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/JsonConstraintsBuilder.ts:43](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/JsonConstraintsBuilder.ts#L43)
Replace the default unit for strings.
##### Default Value
```ts
undefined
```
##### Remarks
Since 3.23.0
---
## Interface: LetrecTypedTie()\
Defined in: [packages/fast-check/src/arbitrary/letrec.ts:23](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/letrec.ts#L23)
Strongly typed type for the `tie` function passed by [letrec](../functions/letrec.md) to the `builder` function we pass to it.
You may want also want to use its loosely typed version [LetrecLooselyTypedTie](../type-aliases/LetrecLooselyTypedTie.md).
### Remarks
Since 3.0.0
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Call Signature
> **LetrecTypedTie**\<`K`\>(`key`): [`Arbitrary`](../classes/Arbitrary.md)\<`T`\[`K`\]\>
Defined in: [packages/fast-check/src/arbitrary/letrec.ts:24](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/letrec.ts#L24)
Strongly typed type for the `tie` function passed by [letrec](../functions/letrec.md) to the `builder` function we pass to it.
You may want also want to use its loosely typed version [LetrecLooselyTypedTie](../type-aliases/LetrecLooselyTypedTie.md).
#### Type Parameters
| Type Parameter |
| ------ |
| `K` *extends* `string` \| `number` \| `symbol` |
#### Parameters
| Parameter | Type |
| ------ | ------ |
| `key` | `K` |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`\[`K`\]\>
#### Remarks
Since 3.0.0
### Call Signature
> **LetrecTypedTie**(`key`): [`Arbitrary`](../classes/Arbitrary.md)\<`unknown`\>
Defined in: [packages/fast-check/src/arbitrary/letrec.ts:25](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/letrec.ts#L25)
Strongly typed type for the `tie` function passed by [letrec](../functions/letrec.md) to the `builder` function we pass to it.
You may want also want to use its loosely typed version [LetrecLooselyTypedTie](../type-aliases/LetrecLooselyTypedTie.md).
#### Parameters
| Parameter | Type |
| ------ | ------ |
| `key` | `string` |
#### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`unknown`\>
#### Remarks
Since 3.0.0
---
## Interface: LoremConstraints
Defined in: [packages/fast-check/src/arbitrary/lorem.ts:21](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/lorem.ts#L21)
Constraints to be applied on [lorem](../functions/lorem.md)
### Remarks
Since 2.5.0
### Properties
#### maxCount? {#maxcount}
> `optional` **maxCount?**: `number`
Defined in: [packages/fast-check/src/arbitrary/lorem.ts:30](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/lorem.ts#L30)
Maximal number of entities:
- maximal number of words in case mode is 'words'
- maximal number of sentences in case mode is 'sentences'
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 2.5.0
***
#### mode? {#mode}
> `optional` **mode?**: `"words"` \| `"sentences"`
Defined in: [packages/fast-check/src/arbitrary/lorem.ts:39](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/lorem.ts#L39)
Type of strings that should be produced by [lorem](../functions/lorem.md):
- words: multiple words
- sentences: multiple sentences
##### Default Value
```ts
'words'
```
##### Remarks
Since 2.5.0
***
#### size? {#size}
> `optional` **size?**: [`SizeForArbitrary`](../type-aliases/SizeForArbitrary.md)
Defined in: [packages/fast-check/src/arbitrary/lorem.ts:44](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/lorem.ts#L44)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
---
## Interface: MapConstraints
Defined in: [packages/fast-check/src/arbitrary/map.ts:18](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/map.ts#L18)
Constraints to be applied on [map](../functions/map.md)
### Remarks
Since 4.4.0
### Properties
#### depthIdentifier? {#depthidentifier}
> `optional` **depthIdentifier?**: `string` \| [`DepthIdentifier`](../type-aliases/DepthIdentifier.md)
Defined in: [packages/fast-check/src/arbitrary/map.ts:44](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/map.ts#L44)
Depth identifier can be used to share the current depth between several instances.
By default, if not specified, each instance of map will have its own depth.
In other words: you can have depth=1 in one while you have depth=100 in another one.
##### Remarks
Since 4.4.0
***
#### maxKeys? {#maxkeys}
> `optional` **maxKeys?**: `number`
Defined in: [packages/fast-check/src/arbitrary/map.ts:30](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/map.ts#L30)
Upper bound for the number of entries defined into the generated instance
##### Default Value
```ts
0x7fffffff
```
##### Remarks
Since 4.4.0
***
#### minKeys? {#minkeys}
> `optional` **minKeys?**: `number`
Defined in: [packages/fast-check/src/arbitrary/map.ts:24](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/map.ts#L24)
Lower bound for the number of entries defined into the generated instance
##### Default Value
```ts
0
```
##### Remarks
Since 4.4.0
***
#### size? {#size}
> `optional` **size?**: [`SizeForArbitrary`](../type-aliases/SizeForArbitrary.md)
Defined in: [packages/fast-check/src/arbitrary/map.ts:35](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/map.ts#L35)
Define how large the generated values should be (at max)
##### Remarks
Since 4.4.0
---
## Interface: MixedCaseConstraints
Defined in: [packages/fast-check/src/arbitrary/mixedCase.ts:10](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/mixedCase.ts#L10)
Constraints to be applied on [mixedCase](../functions/mixedCase.md)
### Remarks
Since 1.17.0
### Properties
#### toggleCase? {#togglecase}
> `optional` **toggleCase?**: (`rawChar`) => `string`
Defined in: [packages/fast-check/src/arbitrary/mixedCase.ts:16](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/mixedCase.ts#L16)
Transform a character to its upper and/or lower case version
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `rawChar` | `string` |
##### Returns
`string`
##### Default Value
try `toUpperCase` on the received code-point, if no effect try `toLowerCase`
##### Remarks
Since 1.17.0
***
#### untoggleAll? {#untoggleall}
> `optional` **untoggleAll?**: (`toggledString`) => `string`
Defined in: [packages/fast-check/src/arbitrary/mixedCase.ts:22](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/mixedCase.ts#L22)
In order to be fully reversable (only in case you want to shrink user definable values)
you should provide a function taking a string containing possibly toggled items and returning its
untoggled version.
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `toggledString` | `string` |
##### Returns
`string`
---
## Interface: NatConstraints
Defined in: [packages/fast-check/src/arbitrary/nat.ts:11](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/nat.ts#L11)
Constraints to be applied on [nat](../functions/nat.md)
### Remarks
Since 2.6.0
### Properties
#### max? {#max}
> `optional` **max?**: `number`
Defined in: [packages/fast-check/src/arbitrary/nat.ts:17](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/nat.ts#L17)
Upper bound for the generated postive integers (included)
##### Default Value
```ts
0x7fffffff
```
##### Remarks
Since 2.6.0
---
## Interface: ObjectConstraints
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:16](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L16)
Constraints for [anything](../functions/anything.md) and [object](../functions/object.md)
### Properties
#### depthSize? {#depthsize}
> `optional` **depthSize?**: [`DepthSize`](../type-aliases/DepthSize.md)
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:22](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L22)
Limit the depth of the object by increasing the probability to generate simple values (defined via values)
as we go deeper in the object.
##### Remarks
Since 2.20.0
***
#### key? {#key}
> `optional` **key?**: [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:45](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L45)
Arbitrary for keys
##### Default Value
[string](../functions/string.md)
##### Remarks
Since 0.0.7
***
#### maxDepth? {#maxdepth}
> `optional` **maxDepth?**: `number`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:28](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L28)
Maximal depth allowed
##### Default Value
Number.POSITIVE_INFINITY — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 0.0.7
***
#### maxKeys? {#maxkeys}
> `optional` **maxKeys?**: `number`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:34](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L34)
Maximal number of keys
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 1.13.0
***
#### size? {#size}
> `optional` **size?**: [`SizeForArbitrary`](../type-aliases/SizeForArbitrary.md)
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:39](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L39)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
***
#### stringUnit? {#stringunit}
> `optional` **stringUnit?**: `"grapheme"` \| `"grapheme-composite"` \| `"grapheme-ascii"` \| `"binary"` \| `"binary-ascii"` \| [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:120](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L120)
Replace the default unit for strings.
##### Default Value
```ts
undefined
```
##### Remarks
Since 3.23.0
***
#### values? {#values}
> `optional` **values?**: [`Arbitrary`](../classes/Arbitrary.md)\<`unknown`\>[]
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:51](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L51)
Arbitrary for values
##### Default Value
[boolean](../functions/boolean.md), [integer](../functions/integer.md), [double](../functions/double.md), [string](../functions/string.md), null, undefined, Number.NaN, +0, -0, Number.EPSILON, Number.MIN_VALUE, Number.MAX_VALUE, Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY
##### Remarks
Since 0.0.7
***
#### withBigInt? {#withbigint}
> `optional` **withBigInt?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:87](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L87)
Also generate BigInt
##### Default Value
```ts
false
```
##### Remarks
Since 1.26.0
***
#### withBoxedValues? {#withboxedvalues}
> `optional` **withBoxedValues?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:57](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L57)
Also generate boxed versions of values
##### Default Value
```ts
false
```
##### Remarks
Since 1.11.0
***
#### withDate? {#withdate}
> `optional` **withDate?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:93](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L93)
Also generate Date
##### Default Value
```ts
false
```
##### Remarks
Since 2.5.0
***
#### withMap? {#withmap}
> `optional` **withMap?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:69](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L69)
Also generate Map
##### Default Value
```ts
false
```
##### Remarks
Since 1.11.0
***
#### withNullPrototype? {#withnullprototype}
> `optional` **withNullPrototype?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:81](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L81)
Also generate object with null prototype
##### Default Value
```ts
false
```
##### Remarks
Since 1.23.0
***
#### withObjectString? {#withobjectstring}
> `optional` **withObjectString?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:75](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L75)
Also generate string representations of object instances
##### Default Value
```ts
false
```
##### Remarks
Since 1.17.0
***
#### withSet? {#withset}
> `optional` **withSet?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:63](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L63)
Also generate Set
##### Default Value
```ts
false
```
##### Remarks
Since 1.11.0
***
#### withSparseArray? {#withsparsearray}
> `optional` **withSparseArray?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:106](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L106)
Also generate sparse arrays (arrays with holes)
##### Default Value
```ts
false
```
##### Remarks
Since 2.13.0
***
#### withTypedArray? {#withtypedarray}
> `optional` **withTypedArray?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:100](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L100)
Also generate typed arrays in: (Uint|Int)(8|16|32)Array and Float(32|64)Array
Remark: no typed arrays made of bigint
##### Default Value
```ts
false
```
##### Remarks
Since 2.9.0
***
#### ~~withUnicodeString?~~ {#withunicodestring}
> `optional` **withUnicodeString?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/QualifiedObjectConstraints.ts:114](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/QualifiedObjectConstraints.ts#L114)
Replace the arbitrary of strings defaulted for key and values by one able to generate unicode strings with non-ascii characters.
If you override key and/or values constraint, this flag will not apply to your override.
##### Deprecated
Prefer using `stringUnit` to customize the kind of strings that will be generated by default.
##### Default Value
```ts
false
```
##### Remarks
Since 3.19.0
---
## Interface: OptionConstraints\
Defined in: [packages/fast-check/src/arbitrary/option.ts:14](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/option.ts#L14)
Constraints to be applied on [option](../functions/option.md)
### Remarks
Since 2.2.0
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `TNil` | `null` |
### Properties
#### depthIdentifier? {#depthidentifier}
> `optional` **depthIdentifier?**: `string` \| [`DepthIdentifier`](../type-aliases/DepthIdentifier.md)
Defined in: [packages/fast-check/src/arbitrary/option.ts:48](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/option.ts#L48)
Depth identifier can be used to share the current depth between several instances.
By default, if not specified, each instance of option will have its own depth.
In other words: you can have depth=1 in one while you have depth=100 in another one.
##### Remarks
Since 2.14.0
***
#### depthSize? {#depthsize}
> `optional` **depthSize?**: [`DepthSize`](../type-aliases/DepthSize.md)
Defined in: [packages/fast-check/src/arbitrary/option.ts:33](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/option.ts#L33)
While going deeper and deeper within a recursive structure (see [letrec](../functions/letrec.md)),
this factor will be used to increase the probability to generate nil.
##### Remarks
Since 2.14.0
***
#### freq? {#freq}
> `optional` **freq?**: `number`
Defined in: [packages/fast-check/src/arbitrary/option.ts:20](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/option.ts#L20)
The probability to build a nil value is of `1 / freq`.
##### Default Value
```ts
6
```
##### Remarks
Since 1.17.0
***
#### maxDepth? {#maxdepth}
> `optional` **maxDepth?**: `number`
Defined in: [packages/fast-check/src/arbitrary/option.ts:39](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/option.ts#L39)
Maximal authorized depth. Once this depth has been reached only nil will be used.
##### Default Value
Number.POSITIVE_INFINITY — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 2.14.0
***
#### nil? {#nil}
> `optional` **nil?**: `TNil`
Defined in: [packages/fast-check/src/arbitrary/option.ts:26](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/option.ts#L26)
The nil value
##### Default Value
```ts
null
```
##### Remarks
Since 1.17.0
---
## Interface: Parameters\
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L12)
Customization of the parameters used to run the properties
### Remarks
Since 0.0.6
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `T` | `void` |
### Properties
#### ~~asyncReporter?~~ {#asyncreporter}
> `optional` **asyncReporter?**: (`runDetails`) => `Promise`\<`void`\>
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:223](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L223)
Replace the default reporter handling errors by a custom one
Reporter is responsible to throw in case of failure: default one throws whenever `runDetails.failed` is true.
But you may want to change this behaviour in yours.
Only used when calling [assert](../functions/assert.md)
Cannot be defined in conjonction with `reporter`
Not compatible with synchronous properties: runner will throw
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `runDetails` | [`RunDetails`](../type-aliases/RunDetails.md)\<`T`\> |
##### Returns
`Promise`\<`void`\>
##### Example
```typescript
// Prefer a plugin relying on the `onAllRunsComplete` hook.
const reporterPlugin: fc.Plugin = () => ({
onAllRunsComplete: async (runDetails) => {
if (runDetails.failed) {
throw new Error(fc.asyncDefaultReportMessage(runDetails));
}
},
});
await fc.assert(asyncProperty, { plugins: [reporterPlugin] });
```
##### Remarks
Since 1.25.0
##### Deprecated
Prefer a plugin relying on an asynchronous `onAllRunsComplete` hook: `fc.assert(asyncProperty, { plugins: [reporterPlugin] })`
***
#### endOnFailure? {#endonfailure}
> `optional` **endOnFailure?**: `boolean`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:170](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L170)
Stop run on failure
It makes the run stop at the first encountered failure without shrinking.
When used in complement to `seed` and `path`,
it replays only the minimal counterexample.
##### Remarks
Since 1.11.0
***
#### examples? {#examples}
> `optional` **examples?**: `T`[]
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:159](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L159)
Custom values added at the beginning of generated ones
It enables users to come with examples they want to test at every run
##### Remarks
Since 1.4.0
***
#### ignoreEqualValues? {#ignoreequalvalues}
> `optional` **ignoreEqualValues?**: `boolean`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:124](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L124)
Discard runs corresponding to already tried values.
WARNING:
Discarded runs will not be replaced.
In other words, if you ask for 100 runs and have 2 discarded runs you will only have 98 effective runs.
NOTE: Relies on `fc.stringify` to check the equality.
##### Remarks
Since 2.14.0
***
#### includeErrorInReport? {#includeerrorinreport}
> `optional` **includeErrorInReport?**: `boolean`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:235](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L235)
By default the Error causing the failure of the predicate will not be directly exposed within the message
of the Error thown by fast-check. It will be exposed by a cause field attached to the Error.
The Error with cause has been supported by Node since 16.14.0 and is properly supported in many test runners.
But if the original Error fails to appear within your test runner,
Or if you prefer the Error to be included directly as part of the message of the resulted Error,
you can toggle this flag and the Error produced by fast-check in case of failure will expose the source Error
as part of the message and not as a cause.
***
#### interruptAfterTimeLimit? {#interruptaftertimelimit}
> `optional` **interruptAfterTimeLimit?**: `number`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:93](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L93)
Interrupt test execution after a given time limit: disabled by default
NOTE: Relies on `Date.now()`.
NOTE:
Useful to avoid having too long running processes in your CI.
Replay capability (see `seed`, `path`) can still be used if needed.
WARNING:
If the test got interrupted before any failure occured
and before it reached the requested number of runs specified by `numRuns`
it will be marked as success. Except if `markInterruptAsFailure` has been set to `true`
##### Remarks
Since 1.19.0
***
#### markInterruptAsFailure? {#markinterruptasfailure}
> `optional` **markInterruptAsFailure?**: `boolean`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:99](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L99)
Mark interrupted runs as failed runs if preceded by one success or more: disabled by default
Interrupted with no success at all always defaults to failure whatever the value of this flag.
##### Remarks
Since 1.19.0
***
#### maxSkipsPerRun? {#maxskipsperrun}
> `optional` **maxSkipsPerRun?**: `number`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:52](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L52)
Maximal number of skipped values per run
Skipped is considered globally, so this value is used to compute maxSkips = maxSkipsPerRun * numRuns.
Runner will consider a run to have failed if it skipped maxSkips+1 times before having generated numRuns valid entries.
See [pre](../functions/pre.md) for more details on pre-conditions
##### Remarks
Since 1.3.0
***
#### numRuns? {#numruns}
> `optional` **numRuns?**: `number`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:41](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L41)
Number of runs before success: 100 by default
##### Remarks
Since 1.0.0
***
#### path? {#path}
> `optional` **path?**: `string`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:130](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L130)
Way to replay a failing property directly with the counterexample.
It can be fed with the counterexamplePath returned by the failing test (requires `seed` too).
##### Remarks
Since 1.0.0
***
#### plugins? {#plugins}
> `optional` **plugins?**: [`Plugin`](../type-aliases/Plugin.md)\<`T`\>[]
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:248](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L248)
Set of plugins extending the way the property gets executed by the runner
Each plugin is instantiated once per run.
They can be leveraged to control and enrich the execution flow of each predicate.
They come after the plugins installed globally via [installGlobalPlugin](../functions/installGlobalPlugin.md).
At execution time, the first plugin of the resulting array is entered first while the last one is the closest to the predicate.
Plugins are instantiated in order.
##### Remarks
Since 4.10.0
***
#### randomType? {#randomtype}
> `optional` **randomType?**: [`RandomType`](../type-aliases/RandomType.md) \| ((`seed`) => `any`)
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:36](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L36)
Random number generator: `xorshift128plus` by default
Random generator is the core element behind the generation of random values - changing it might directly impact the quality and performances of the generation of random values.
It can be one of: 'mersenne', 'congruential', 'congruential32', 'xorshift128plus', 'xoroshiro128plus'
Or any function able to build a `RandomGenerator` based on a seed
As required since pure-rand v6.0.0, when passing a builder for [RandomGenerator](../type-aliases/RandomGenerator.md),
the random number generator must generate values between -0x80000000 and 0x7fffffff.
##### Remarks
Since 1.6.0
***
#### ~~reporter?~~ {#reporter}
> `optional` **reporter?**: (`runDetails`) => `void`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:196](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L196)
Replace the default reporter handling errors by a custom one
Reporter is responsible to throw in case of failure: default one throws whenever `runDetails.failed` is true.
But you may want to change this behaviour in yours.
Only used when calling [assert](../functions/assert.md)
Cannot be defined in conjonction with `asyncReporter`
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `runDetails` | [`RunDetails`](../type-aliases/RunDetails.md)\<`T`\> |
##### Returns
`void`
##### Example
```typescript
// Prefer a plugin relying on the `onAllRunsComplete` hook.
const reporterPlugin: fc.Plugin = () => ({
onAllRunsComplete: (runDetails) => {
if (runDetails.failed) {
throw new Error(fc.defaultReportMessage(runDetails));
}
},
});
fc.assert(property, { plugins: [reporterPlugin] });
```
##### Remarks
Since 1.25.0
##### Deprecated
Prefer a plugin relying on the `onAllRunsComplete` hook: `fc.assert(property, { plugins: [reporterPlugin] })`
***
#### seed? {#seed}
> `optional` **seed?**: `number`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:23](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L23)
Initial seed of the generator: `Date.now()` by default
It can be forced to replay a failed run.
In theory, seeds are supposed to be 32-bit integers.
In case of double value, the seed will be rescaled into a valid 32-bit integer (eg.: values between 0 and 1 will be evenly spread into the range of possible seeds).
##### Remarks
Since 0.0.6
***
#### skipAllAfterTimeLimit? {#skipallaftertimelimit}
> `optional` **skipAllAfterTimeLimit?**: `number`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:76](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L76)
Skip all runs after a given time limit: disabled by default
NOTE: Relies on `Date.now()`.
NOTE:
Useful to stop too long shrinking processes.
Replay capability (see `seed`, `path`) can resume the shrinking.
WARNING:
It skips runs. Thus test might be marked as failed.
Indeed, it might not reached the requested number of successful runs.
##### Remarks
Since 1.15.0
***
#### skipEqualValues? {#skipequalvalues}
> `optional` **skipEqualValues?**: `boolean`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:112](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L112)
Skip runs corresponding to already tried values.
WARNING:
Discarded runs will be retried. Under the hood they are simple calls to `fc.pre`.
In other words, if you ask for 100 runs but your generator can only generate 10 values then the property will fail as 100 runs will never be reached.
Contrary to `ignoreEqualValues` you always have the number of runs you requested.
NOTE: Relies on `fc.stringify` to check the equality.
##### Remarks
Since 2.14.0
***
#### ~~timeout?~~ {#timeout}
> `optional` **timeout?**: `number`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:60](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L60)
Maximum time in milliseconds for the predicate to answer: disabled by default
WARNING: Only works for async code (see [asyncProperty](../functions/asyncProperty.md)), will not interrupt a synchronous code.
##### Remarks
Since 0.0.11
##### Deprecated
Prefer using the timeout plugin
***
#### unbiased? {#unbiased}
> `optional` **unbiased?**: `boolean`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:140](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L140)
Force the use of unbiased arbitraries: biased by default
##### Remarks
Since 1.1.0
***
#### verbose? {#verbose}
> `optional` **verbose?**: `boolean` \| [`VerbosityLevel`](../enumerations/VerbosityLevel.md)
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:151](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L151)
Enable verbose mode: [VerbosityLevel.None](../enumerations/VerbosityLevel.md#none) by default
Using `verbose: true` is equivalent to `verbose: VerbosityLevel.Verbose`
It can prove very useful to troubleshoot issues.
See [VerbosityLevel](../enumerations/VerbosityLevel.md) for more details on each level.
##### Remarks
Since 1.1.0
### Methods
#### logger()? {#logger}
> `optional` **logger**(`v`): `void`
Defined in: [packages/fast-check/src/check/runner/configuration/Parameters.ts:135](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/Parameters.ts#L135)
Logger (see [statistics](../functions/statistics.md)): `console.log` by default
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `v` | `string` |
##### Returns
`void`
##### Remarks
Since 0.0.6
---
## Interface: RunDetailsCommon\
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:91](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L91)
Shared part between variants of RunDetails
### Remarks
Since 2.2.0
### Extended by
- [`RunDetailsFailureProperty`](RunDetailsFailureProperty.md)
- [`RunDetailsFailureTooManySkips`](RunDetailsFailureTooManySkips.md)
- [`RunDetailsFailureInterrupted`](RunDetailsFailureInterrupted.md)
- [`RunDetailsSuccess`](RunDetailsSuccess.md)
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Properties
#### counterexample {#counterexample}
> **counterexample**: `Ts` \| `null`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:136](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L136)
In case of failure: the counterexample contains the minimal failing case (first failure after shrinking)
##### Remarks
Since 0.0.7
***
#### counterexamplePath {#counterexamplepath}
> **counterexamplePath**: `string` \| `null`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:149](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L149)
In case of failure: path to the counterexample
For replay purposes, it can be forced in [assert](../functions/assert.md), [check](../functions/check.md), [sample](../functions/sample.md) and [statistics](../functions/statistics.md) using `Parameters`
##### Remarks
Since 1.0.0
***
#### errorInstance {#errorinstance}
> **errorInstance**: `unknown`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:141](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L141)
In case of failure: it contains the error that has been thrown if any
##### Remarks
Since 3.0.0
***
#### executionSummary {#executionsummary}
> **executionSummary**: [`ExecutionTree`](ExecutionTree.md)\<`Ts`\>[]
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:172](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L172)
Execution summary of the run
Traces the origin of each value encountered during the test and its execution status.
Can help to diagnose shrinking issues.
You must enable verbose with at least `Verbosity.Verbose` in `Parameters`
in order to have values in it:
- Verbose: Only failures
- VeryVerbose: Failures, Successes and Skipped
##### Remarks
Since 1.9.0
***
#### failed {#failed}
> **failed**: `boolean`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:96](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L96)
Does the property failed during the execution of [check](../functions/check.md)?
##### Remarks
Since 0.0.7
***
#### failures {#failures}
> **failures**: `Ts`[]
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:158](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L158)
List all failures that have occurred during the run
You must enable verbose with at least `Verbosity.Verbose` in `Parameters`
in order to have values in it
##### Remarks
Since 1.1.0
***
#### interrupted {#interrupted}
> **interrupted**: `boolean`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:101](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L101)
Was the execution interrupted?
##### Remarks
Since 1.19.0
***
#### numRuns {#numruns}
> **numRuns**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:110](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L110)
Number of runs
- In case of failed property: Number of runs up to the first failure (including the failure run)
- Otherwise: Number of successful executions
##### Remarks
Since 1.0.0
***
#### numShrinks {#numshrinks}
> **numShrinks**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:124](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L124)
Number of shrinks required to get to the minimal failing case (aka counterexample)
##### Remarks
Since 1.0.0
***
#### numSkips {#numskips}
> **numSkips**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:119](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L119)
Number of skipped entries due to failed pre-condition
As `numRuns` it only takes into account the skipped values that occured before the first failure.
Refer to [pre](../functions/pre.md) to add such pre-conditions.
##### Remarks
Since 1.3.0
***
#### runConfiguration {#runconfiguration}
> **runConfiguration**: [`Parameters`](Parameters.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:186](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L186)
Configuration of the run
It includes both local parameters set on [check](../functions/check.md) or [assert](../functions/assert.md)
and global ones specified using [configureGlobal](../functions/configureGlobal.md)
##### Remarks
Since 1.25.0
***
#### seed {#seed}
> **seed**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:131](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L131)
Seed that have been used by the run
It can be forced in [assert](../functions/assert.md), [check](../functions/check.md), [sample](../functions/sample.md) and [statistics](../functions/statistics.md) using `Parameters`
##### Remarks
Since 0.0.7
***
#### verbose {#verbose}
> **verbose**: [`VerbosityLevel`](../enumerations/VerbosityLevel.md)
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:177](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L177)
Verbosity level required by the user
##### Remarks
Since 1.9.0
---
## Interface: RunDetailsFailureInterrupted\
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:62](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L62)
Run reported as failed because
it took too long and thus has been interrupted
Refer to [RunDetailsCommon](RunDetailsCommon.md) for more details
### Remarks
Since 1.25.0
### Extends
- [`RunDetailsCommon`](RunDetailsCommon.md)\<`Ts`\>
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Properties
#### counterexample {#counterexample}
> **counterexample**: `null`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:65](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L65)
In case of failure: the counterexample contains the minimal failing case (first failure after shrinking)
##### Remarks
Since 0.0.7
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`counterexample`](RunDetailsCommon.md#counterexample)
***
#### counterexamplePath {#counterexamplepath}
> **counterexamplePath**: `null`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:66](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L66)
In case of failure: path to the counterexample
For replay purposes, it can be forced in [assert](../functions/assert.md), [check](../functions/check.md), [sample](../functions/sample.md) and [statistics](../functions/statistics.md) using `Parameters`
##### Remarks
Since 1.0.0
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`counterexamplePath`](RunDetailsCommon.md#counterexamplepath)
***
#### errorInstance {#errorinstance}
> **errorInstance**: `null`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:67](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L67)
In case of failure: it contains the error that has been thrown if any
##### Remarks
Since 3.0.0
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`errorInstance`](RunDetailsCommon.md#errorinstance)
***
#### executionSummary {#executionsummary}
> **executionSummary**: [`ExecutionTree`](ExecutionTree.md)\<`Ts`\>[]
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:172](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L172)
Execution summary of the run
Traces the origin of each value encountered during the test and its execution status.
Can help to diagnose shrinking issues.
You must enable verbose with at least `Verbosity.Verbose` in `Parameters`
in order to have values in it:
- Verbose: Only failures
- VeryVerbose: Failures, Successes and Skipped
##### Remarks
Since 1.9.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`executionSummary`](RunDetailsCommon.md#executionsummary)
***
#### failed {#failed}
> **failed**: `true`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:63](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L63)
Does the property failed during the execution of [check](../functions/check.md)?
##### Remarks
Since 0.0.7
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`failed`](RunDetailsCommon.md#failed)
***
#### failures {#failures}
> **failures**: `Ts`[]
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:158](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L158)
List all failures that have occurred during the run
You must enable verbose with at least `Verbosity.Verbose` in `Parameters`
in order to have values in it
##### Remarks
Since 1.1.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`failures`](RunDetailsCommon.md#failures)
***
#### interrupted {#interrupted}
> **interrupted**: `true`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:64](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L64)
Was the execution interrupted?
##### Remarks
Since 1.19.0
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`interrupted`](RunDetailsCommon.md#interrupted)
***
#### numRuns {#numruns}
> **numRuns**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:110](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L110)
Number of runs
- In case of failed property: Number of runs up to the first failure (including the failure run)
- Otherwise: Number of successful executions
##### Remarks
Since 1.0.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`numRuns`](RunDetailsCommon.md#numruns)
***
#### numShrinks {#numshrinks}
> **numShrinks**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:124](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L124)
Number of shrinks required to get to the minimal failing case (aka counterexample)
##### Remarks
Since 1.0.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`numShrinks`](RunDetailsCommon.md#numshrinks)
***
#### numSkips {#numskips}
> **numSkips**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:119](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L119)
Number of skipped entries due to failed pre-condition
As `numRuns` it only takes into account the skipped values that occured before the first failure.
Refer to [pre](../functions/pre.md) to add such pre-conditions.
##### Remarks
Since 1.3.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`numSkips`](RunDetailsCommon.md#numskips)
***
#### runConfiguration {#runconfiguration}
> **runConfiguration**: [`Parameters`](Parameters.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:186](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L186)
Configuration of the run
It includes both local parameters set on [check](../functions/check.md) or [assert](../functions/assert.md)
and global ones specified using [configureGlobal](../functions/configureGlobal.md)
##### Remarks
Since 1.25.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`runConfiguration`](RunDetailsCommon.md#runconfiguration)
***
#### seed {#seed}
> **seed**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:131](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L131)
Seed that have been used by the run
It can be forced in [assert](../functions/assert.md), [check](../functions/check.md), [sample](../functions/sample.md) and [statistics](../functions/statistics.md) using `Parameters`
##### Remarks
Since 0.0.7
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`seed`](RunDetailsCommon.md#seed)
***
#### verbose {#verbose}
> **verbose**: [`VerbosityLevel`](../enumerations/VerbosityLevel.md)
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:177](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L177)
Verbosity level required by the user
##### Remarks
Since 1.9.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`verbose`](RunDetailsCommon.md#verbose)
---
## Interface: RunDetailsFailureProperty\
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:28](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L28)
Run reported as failed because
the property failed
Refer to [RunDetailsCommon](RunDetailsCommon.md) for more details
### Remarks
Since 1.25.0
### Extends
- [`RunDetailsCommon`](RunDetailsCommon.md)\<`Ts`\>
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Properties
#### counterexample {#counterexample}
> **counterexample**: `Ts`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:31](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L31)
In case of failure: the counterexample contains the minimal failing case (first failure after shrinking)
##### Remarks
Since 0.0.7
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`counterexample`](RunDetailsCommon.md#counterexample)
***
#### counterexamplePath {#counterexamplepath}
> **counterexamplePath**: `string`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:32](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L32)
In case of failure: path to the counterexample
For replay purposes, it can be forced in [assert](../functions/assert.md), [check](../functions/check.md), [sample](../functions/sample.md) and [statistics](../functions/statistics.md) using `Parameters`
##### Remarks
Since 1.0.0
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`counterexamplePath`](RunDetailsCommon.md#counterexamplepath)
***
#### errorInstance {#errorinstance}
> **errorInstance**: `unknown`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:33](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L33)
In case of failure: it contains the error that has been thrown if any
##### Remarks
Since 3.0.0
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`errorInstance`](RunDetailsCommon.md#errorinstance)
***
#### executionSummary {#executionsummary}
> **executionSummary**: [`ExecutionTree`](ExecutionTree.md)\<`Ts`\>[]
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:172](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L172)
Execution summary of the run
Traces the origin of each value encountered during the test and its execution status.
Can help to diagnose shrinking issues.
You must enable verbose with at least `Verbosity.Verbose` in `Parameters`
in order to have values in it:
- Verbose: Only failures
- VeryVerbose: Failures, Successes and Skipped
##### Remarks
Since 1.9.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`executionSummary`](RunDetailsCommon.md#executionsummary)
***
#### failed {#failed}
> **failed**: `true`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:29](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L29)
Does the property failed during the execution of [check](../functions/check.md)?
##### Remarks
Since 0.0.7
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`failed`](RunDetailsCommon.md#failed)
***
#### failures {#failures}
> **failures**: `Ts`[]
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:158](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L158)
List all failures that have occurred during the run
You must enable verbose with at least `Verbosity.Verbose` in `Parameters`
in order to have values in it
##### Remarks
Since 1.1.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`failures`](RunDetailsCommon.md#failures)
***
#### interrupted {#interrupted}
> **interrupted**: `boolean`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:30](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L30)
Was the execution interrupted?
##### Remarks
Since 1.19.0
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`interrupted`](RunDetailsCommon.md#interrupted)
***
#### numRuns {#numruns}
> **numRuns**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:110](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L110)
Number of runs
- In case of failed property: Number of runs up to the first failure (including the failure run)
- Otherwise: Number of successful executions
##### Remarks
Since 1.0.0
##### Inherited from
[`RunDetailsFailureTooManySkips`](RunDetailsFailureTooManySkips.md).[`numRuns`](RunDetailsFailureTooManySkips.md#numruns)
***
#### numShrinks {#numshrinks}
> **numShrinks**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:124](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L124)
Number of shrinks required to get to the minimal failing case (aka counterexample)
##### Remarks
Since 1.0.0
##### Inherited from
[`RunDetailsFailureTooManySkips`](RunDetailsFailureTooManySkips.md).[`numShrinks`](RunDetailsFailureTooManySkips.md#numshrinks)
***
#### numSkips {#numskips}
> **numSkips**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:119](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L119)
Number of skipped entries due to failed pre-condition
As `numRuns` it only takes into account the skipped values that occured before the first failure.
Refer to [pre](../functions/pre.md) to add such pre-conditions.
##### Remarks
Since 1.3.0
##### Inherited from
[`RunDetailsFailureTooManySkips`](RunDetailsFailureTooManySkips.md).[`numSkips`](RunDetailsFailureTooManySkips.md#numskips)
***
#### runConfiguration {#runconfiguration}
> **runConfiguration**: [`Parameters`](Parameters.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:186](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L186)
Configuration of the run
It includes both local parameters set on [check](../functions/check.md) or [assert](../functions/assert.md)
and global ones specified using [configureGlobal](../functions/configureGlobal.md)
##### Remarks
Since 1.25.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`runConfiguration`](RunDetailsCommon.md#runconfiguration)
***
#### seed {#seed}
> **seed**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:131](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L131)
Seed that have been used by the run
It can be forced in [assert](../functions/assert.md), [check](../functions/check.md), [sample](../functions/sample.md) and [statistics](../functions/statistics.md) using `Parameters`
##### Remarks
Since 0.0.7
##### Inherited from
[`RunDetailsFailureTooManySkips`](RunDetailsFailureTooManySkips.md).[`seed`](RunDetailsFailureTooManySkips.md#seed)
***
#### verbose {#verbose}
> **verbose**: [`VerbosityLevel`](../enumerations/VerbosityLevel.md)
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:177](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L177)
Verbosity level required by the user
##### Remarks
Since 1.9.0
##### Inherited from
[`RunDetailsFailureTooManySkips`](RunDetailsFailureTooManySkips.md).[`verbose`](RunDetailsFailureTooManySkips.md#verbose)
---
## Interface: RunDetailsFailureTooManySkips\
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:45](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L45)
Run reported as failed because
too many retries have been attempted to generate valid values
Refer to [RunDetailsCommon](RunDetailsCommon.md) for more details
### Remarks
Since 1.25.0
### Extends
- [`RunDetailsCommon`](RunDetailsCommon.md)\<`Ts`\>
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Properties
#### counterexample {#counterexample}
> **counterexample**: `null`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:48](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L48)
In case of failure: the counterexample contains the minimal failing case (first failure after shrinking)
##### Remarks
Since 0.0.7
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`counterexample`](RunDetailsCommon.md#counterexample)
***
#### counterexamplePath {#counterexamplepath}
> **counterexamplePath**: `null`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:49](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L49)
In case of failure: path to the counterexample
For replay purposes, it can be forced in [assert](../functions/assert.md), [check](../functions/check.md), [sample](../functions/sample.md) and [statistics](../functions/statistics.md) using `Parameters`
##### Remarks
Since 1.0.0
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`counterexamplePath`](RunDetailsCommon.md#counterexamplepath)
***
#### errorInstance {#errorinstance}
> **errorInstance**: `null`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:50](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L50)
In case of failure: it contains the error that has been thrown if any
##### Remarks
Since 3.0.0
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`errorInstance`](RunDetailsCommon.md#errorinstance)
***
#### executionSummary {#executionsummary}
> **executionSummary**: [`ExecutionTree`](ExecutionTree.md)\<`Ts`\>[]
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:172](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L172)
Execution summary of the run
Traces the origin of each value encountered during the test and its execution status.
Can help to diagnose shrinking issues.
You must enable verbose with at least `Verbosity.Verbose` in `Parameters`
in order to have values in it:
- Verbose: Only failures
- VeryVerbose: Failures, Successes and Skipped
##### Remarks
Since 1.9.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`executionSummary`](RunDetailsCommon.md#executionsummary)
***
#### failed {#failed}
> **failed**: `true`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:46](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L46)
Does the property failed during the execution of [check](../functions/check.md)?
##### Remarks
Since 0.0.7
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`failed`](RunDetailsCommon.md#failed)
***
#### failures {#failures}
> **failures**: `Ts`[]
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:158](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L158)
List all failures that have occurred during the run
You must enable verbose with at least `Verbosity.Verbose` in `Parameters`
in order to have values in it
##### Remarks
Since 1.1.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`failures`](RunDetailsCommon.md#failures)
***
#### interrupted {#interrupted}
> **interrupted**: `false`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:47](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L47)
Was the execution interrupted?
##### Remarks
Since 1.19.0
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`interrupted`](RunDetailsCommon.md#interrupted)
***
#### numRuns {#numruns}
> **numRuns**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:110](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L110)
Number of runs
- In case of failed property: Number of runs up to the first failure (including the failure run)
- Otherwise: Number of successful executions
##### Remarks
Since 1.0.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`numRuns`](RunDetailsCommon.md#numruns)
***
#### numShrinks {#numshrinks}
> **numShrinks**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:124](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L124)
Number of shrinks required to get to the minimal failing case (aka counterexample)
##### Remarks
Since 1.0.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`numShrinks`](RunDetailsCommon.md#numshrinks)
***
#### numSkips {#numskips}
> **numSkips**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:119](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L119)
Number of skipped entries due to failed pre-condition
As `numRuns` it only takes into account the skipped values that occured before the first failure.
Refer to [pre](../functions/pre.md) to add such pre-conditions.
##### Remarks
Since 1.3.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`numSkips`](RunDetailsCommon.md#numskips)
***
#### runConfiguration {#runconfiguration}
> **runConfiguration**: [`Parameters`](Parameters.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:186](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L186)
Configuration of the run
It includes both local parameters set on [check](../functions/check.md) or [assert](../functions/assert.md)
and global ones specified using [configureGlobal](../functions/configureGlobal.md)
##### Remarks
Since 1.25.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`runConfiguration`](RunDetailsCommon.md#runconfiguration)
***
#### seed {#seed}
> **seed**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:131](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L131)
Seed that have been used by the run
It can be forced in [assert](../functions/assert.md), [check](../functions/check.md), [sample](../functions/sample.md) and [statistics](../functions/statistics.md) using `Parameters`
##### Remarks
Since 0.0.7
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`seed`](RunDetailsCommon.md#seed)
***
#### verbose {#verbose}
> **verbose**: [`VerbosityLevel`](../enumerations/VerbosityLevel.md)
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:177](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L177)
Verbosity level required by the user
##### Remarks
Since 1.9.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`verbose`](RunDetailsCommon.md#verbose)
---
## Interface: RunDetailsSuccess\
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:78](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L78)
Run reported as success
Refer to [RunDetailsCommon](RunDetailsCommon.md) for more details
### Remarks
Since 1.25.0
### Extends
- [`RunDetailsCommon`](RunDetailsCommon.md)\<`Ts`\>
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Properties
#### counterexample {#counterexample}
> **counterexample**: `null`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:81](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L81)
In case of failure: the counterexample contains the minimal failing case (first failure after shrinking)
##### Remarks
Since 0.0.7
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`counterexample`](RunDetailsCommon.md#counterexample)
***
#### counterexamplePath {#counterexamplepath}
> **counterexamplePath**: `null`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:82](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L82)
In case of failure: path to the counterexample
For replay purposes, it can be forced in [assert](../functions/assert.md), [check](../functions/check.md), [sample](../functions/sample.md) and [statistics](../functions/statistics.md) using `Parameters`
##### Remarks
Since 1.0.0
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`counterexamplePath`](RunDetailsCommon.md#counterexamplepath)
***
#### errorInstance {#errorinstance}
> **errorInstance**: `null`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:83](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L83)
In case of failure: it contains the error that has been thrown if any
##### Remarks
Since 3.0.0
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`errorInstance`](RunDetailsCommon.md#errorinstance)
***
#### executionSummary {#executionsummary}
> **executionSummary**: [`ExecutionTree`](ExecutionTree.md)\<`Ts`\>[]
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:172](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L172)
Execution summary of the run
Traces the origin of each value encountered during the test and its execution status.
Can help to diagnose shrinking issues.
You must enable verbose with at least `Verbosity.Verbose` in `Parameters`
in order to have values in it:
- Verbose: Only failures
- VeryVerbose: Failures, Successes and Skipped
##### Remarks
Since 1.9.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`executionSummary`](RunDetailsCommon.md#executionsummary)
***
#### failed {#failed}
> **failed**: `false`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:79](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L79)
Does the property failed during the execution of [check](../functions/check.md)?
##### Remarks
Since 0.0.7
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`failed`](RunDetailsCommon.md#failed)
***
#### failures {#failures}
> **failures**: `Ts`[]
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:158](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L158)
List all failures that have occurred during the run
You must enable verbose with at least `Verbosity.Verbose` in `Parameters`
in order to have values in it
##### Remarks
Since 1.1.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`failures`](RunDetailsCommon.md#failures)
***
#### interrupted {#interrupted}
> **interrupted**: `boolean`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:80](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L80)
Was the execution interrupted?
##### Remarks
Since 1.19.0
##### Overrides
[`RunDetailsCommon`](RunDetailsCommon.md).[`interrupted`](RunDetailsCommon.md#interrupted)
***
#### numRuns {#numruns}
> **numRuns**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:110](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L110)
Number of runs
- In case of failed property: Number of runs up to the first failure (including the failure run)
- Otherwise: Number of successful executions
##### Remarks
Since 1.0.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`numRuns`](RunDetailsCommon.md#numruns)
***
#### numShrinks {#numshrinks}
> **numShrinks**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:124](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L124)
Number of shrinks required to get to the minimal failing case (aka counterexample)
##### Remarks
Since 1.0.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`numShrinks`](RunDetailsCommon.md#numshrinks)
***
#### numSkips {#numskips}
> **numSkips**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:119](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L119)
Number of skipped entries due to failed pre-condition
As `numRuns` it only takes into account the skipped values that occured before the first failure.
Refer to [pre](../functions/pre.md) to add such pre-conditions.
##### Remarks
Since 1.3.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`numSkips`](RunDetailsCommon.md#numskips)
***
#### runConfiguration {#runconfiguration}
> **runConfiguration**: [`Parameters`](Parameters.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:186](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L186)
Configuration of the run
It includes both local parameters set on [check](../functions/check.md) or [assert](../functions/assert.md)
and global ones specified using [configureGlobal](../functions/configureGlobal.md)
##### Remarks
Since 1.25.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`runConfiguration`](RunDetailsCommon.md#runconfiguration)
***
#### seed {#seed}
> **seed**: `number`
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:131](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L131)
Seed that have been used by the run
It can be forced in [assert](../functions/assert.md), [check](../functions/check.md), [sample](../functions/sample.md) and [statistics](../functions/statistics.md) using `Parameters`
##### Remarks
Since 0.0.7
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`seed`](RunDetailsCommon.md#seed)
***
#### verbose {#verbose}
> **verbose**: [`VerbosityLevel`](../enumerations/VerbosityLevel.md)
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:177](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L177)
Verbosity level required by the user
##### Remarks
Since 1.9.0
##### Inherited from
[`RunDetailsCommon`](RunDetailsCommon.md).[`verbose`](RunDetailsCommon.md#verbose)
---
## Interface: Scheduler\
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:23](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L23)
Instance able to reschedule the ordering of promises for a given app
### Remarks
Since 1.20.0
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `TMetaData` | `unknown` |
### Properties
#### report {#report}
> **report**: () => [`SchedulerReportItem`](SchedulerReportItem.md)\<`TMetaData`\>[]
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:131](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L131)
Produce an array containing all the scheduled tasks so far with their execution status.
If the task has been executed, it includes a string representation of the associated output or error produced by the task if any.
Tasks will be returned in the order they get executed by the scheduler.
##### Returns
[`SchedulerReportItem`](SchedulerReportItem.md)\<`TMetaData`\>[]
##### Remarks
Since 1.25.0
***
#### schedule {#schedule}
> **schedule**: \<`T`\>(`task`, `label?`, `metadata?`, `customAct?`) => `Promise`\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:28](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L28)
Wrap a new task using the Scheduler
##### Type Parameters
| Type Parameter |
| ------ |
| `T` |
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `task` | `Promise`\<`T`\> |
| `label?` | `string` |
| `metadata?` | `TMetaData` |
| `customAct?` | [`SchedulerAct`](../type-aliases/SchedulerAct.md) |
##### Returns
`Promise`\<`T`\>
##### Remarks
Since 1.20.0
***
#### scheduleFunction {#schedulefunction}
> **scheduleFunction**: \<`TArgs`, `T`\>(`asyncFunction`, `customAct?`) => (...`args`) => `Promise`\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:34](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L34)
Automatically wrap function output using the Scheduler
##### Type Parameters
| Type Parameter |
| ------ |
| `TArgs` *extends* `any`[] |
| `T` |
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `asyncFunction` | (...`args`) => `Promise`\<`T`\> |
| `customAct?` | [`SchedulerAct`](../type-aliases/SchedulerAct.md) |
##### Returns
(...`args`) => `Promise`\<`T`\>
##### Remarks
Since 1.20.0
***
#### ~~waitAll~~ {#waitall}
> **waitAll**: (`customAct?`) => `Promise`\<`void`\>
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:82](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L82)
Wait all scheduled tasks,
including the ones that might be created by one of the resolved task
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `customAct?` | [`SchedulerAct`](../type-aliases/SchedulerAct.md) |
##### Returns
`Promise`\<`void`\>
##### Remarks
Since 1.20.0
##### Deprecated
Use `waitIdle()` instead, it comes with a more predictable behavior awaiting all scheduled and reachable tasks to be completed
***
#### waitFor {#waitfor}
> **waitFor**: \<`T`\>(`unscheduledTask`, `customAct?`) => `Promise`\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:121](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L121)
Wait as many scheduled tasks as need to resolve the received Promise
Some tests frameworks like `supertest` are not triggering calls to subsequent queries in a synchronous way,
some are waiting an explicit call to `then` to trigger them (either synchronously or asynchronously)...
As a consequence, none of `waitOne` or `waitAll` cannot wait for them out-of-the-box.
This helper is responsible to wait as many scheduled tasks as needed (but the bare minimal) to get
`unscheduledTask` resolved. Once resolved it returns its output either success or failure.
Be aware that while this helper will wait eveything to be ready for `unscheduledTask` to resolve,
having uncontrolled tasks triggering stuff required for `unscheduledTask` might be a source a uncontrollable
and not reproducible randomness as those triggers cannot be handled and scheduled by fast-check.
##### Type Parameters
| Type Parameter |
| ------ |
| `T` |
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `unscheduledTask` | `Promise`\<`T`\> |
| `customAct?` | [`SchedulerAct`](../type-aliases/SchedulerAct.md) |
##### Returns
`Promise`\<`T`\>
##### Remarks
Since 2.24.0
***
#### waitIdle {#waitidle}
> **waitIdle**: (`customAct?`) => `Promise`\<`void`\>
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:103](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L103)
Wait until the scheduler becomes idle: all scheduled and reachable tasks have completed.
It will include tasks scheduled by other tasks, recursively.
Note: Tasks triggered by uncontrolled sources (like `fetch` or external events) cannot be detected
or awaited and may lead to incomplete waits.
If you want to wait for a precise event to happen you should rather opt for `waitFor` or `waitNext`
given they offer you a more granular control on what you are exactly waiting for.
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `customAct?` | [`SchedulerAct`](../type-aliases/SchedulerAct.md) |
##### Returns
`Promise`\<`void`\>
##### Remarks
Since 4.2.0
***
#### waitNext {#waitnext}
> **waitNext**: (`count`, `customAct?`) => `Promise`\<`void`\>
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:88](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L88)
Wait and schedule exactly `count` scheduled tasks.
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `count` | `number` |
| `customAct?` | [`SchedulerAct`](../type-aliases/SchedulerAct.md) |
##### Returns
`Promise`\<`void`\>
##### Remarks
Since 4.2.0
***
#### ~~waitOne~~ {#waitone}
> **waitOne**: (`customAct?`) => `Promise`\<`void`\>
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:74](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L74)
Wait one scheduled task to be executed
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `customAct?` | [`SchedulerAct`](../type-aliases/SchedulerAct.md) |
##### Returns
`Promise`\<`void`\>
##### Throws
Whenever there is no task scheduled
##### Remarks
Since 1.20.0
##### Deprecated
Use `waitNext(1)` instead, it comes with a more predictable behavior
### Methods
#### count() {#count}
> **count**(): `number`
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:66](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L66)
Count of pending scheduled tasks
##### Returns
`number`
##### Remarks
Since 1.20.0
***
#### scheduleSequence() {#schedulesequence}
> **scheduleSequence**(`sequenceBuilders`, `customAct?`): `object`
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:53](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L53)
Schedule a sequence of Promise to be executed sequencially.
Items within the sequence might be interleaved by other scheduled operations.
Please note that whenever an item from the sequence has started,
the scheduler will wait until its end before moving to another scheduled task.
A handle is returned by the function in order to monitor the state of the sequence.
Sequence will be marked:
- done if all the promises have been executed properly
- faulty if one of the promises within the sequence throws
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `sequenceBuilders` | [`SchedulerSequenceItem`](../type-aliases/SchedulerSequenceItem.md)\<`TMetaData`\>[] |
| `customAct?` | [`SchedulerAct`](../type-aliases/SchedulerAct.md) |
##### Returns
`object`
###### done
> **done**: `boolean`
###### faulty
> **faulty**: `boolean`
###### task
> **task**: `Promise`\<\{ `done`: `boolean`; `faulty`: `boolean`; \}\>
##### Remarks
Since 1.20.0
---
## Interface: SchedulerConstraints
Defined in: [packages/fast-check/src/arbitrary/scheduler.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/scheduler.ts#L12)
Constraints to be applied on [scheduler](../functions/scheduler.md)
### Remarks
Since 2.2.0
### Properties
#### act {#act}
> **act**: (`f`) => `Promise`\<`unknown`\>
Defined in: [packages/fast-check/src/arbitrary/scheduler.ts:17](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/scheduler.ts#L17)
Ensure that all scheduled tasks will be executed in the right context (for instance it can be the `act` of React)
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `f` | () => `Promise`\<`void`\> |
##### Returns
`Promise`\<`unknown`\>
##### Remarks
Since 1.21.0
---
## Interface: SchedulerReportItem\
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:164](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L164)
Describe a task for the report produced by the scheduler
### Remarks
Since 1.25.0
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `TMetaData` | `unknown` |
### Properties
#### label {#label}
> **label**: `string`
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:192](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L192)
Label of the task
##### Remarks
Since 1.25.0
***
#### metadata? {#metadata}
> `optional` **metadata?**: `TMetaData`
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:197](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L197)
Metadata linked when scheduling the task
##### Remarks
Since 1.25.0
***
#### outputValue? {#outputvalue}
> `optional` **outputValue?**: `string`
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:202](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L202)
Stringified version of the output or error computed using fc.stringify
##### Remarks
Since 1.25.0
***
#### schedulingType {#schedulingtype}
> **schedulingType**: `"function"` \| `"promise"` \| `"sequence"`
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:182](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L182)
How was this task scheduled?
- promise: schedule
- function: scheduleFunction
- sequence: scheduleSequence
##### Remarks
Since 1.25.0
***
#### status {#status}
> **status**: `"resolved"` \| `"rejected"` \| `"pending"`
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:173](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L173)
Execution status for this task
- resolved: task released by the scheduler and successful
- rejected: task released by the scheduler but with errors
- pending: task still pending in the scheduler, not released yet
##### Remarks
Since 1.25.0
***
#### taskId {#taskid}
> **taskId**: `number`
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:187](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L187)
Incremental id for the task, first received task has taskId = 1
##### Remarks
Since 1.25.0
---
## Interface: ShuffledSubarrayConstraints
Defined in: [packages/fast-check/src/arbitrary/shuffledSubarray.ts:9](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/shuffledSubarray.ts#L9)
Constraints to be applied on [shuffledSubarray](../functions/shuffledSubarray.md)
### Remarks
Since 2.18.0
### Properties
#### maxLength? {#maxlength}
> `optional` **maxLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/shuffledSubarray.ts:21](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/shuffledSubarray.ts#L21)
Upper bound of the generated subarray size (included)
##### Default Value
```ts
The length of the original array itself
```
##### Remarks
Since 2.4.0
***
#### minLength? {#minlength}
> `optional` **minLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/shuffledSubarray.ts:15](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/shuffledSubarray.ts#L15)
Lower bound of the generated subarray size (included)
##### Default Value
```ts
0
```
##### Remarks
Since 2.4.0
---
## Interface: SparseArrayConstraints
Defined in: [packages/fast-check/src/arbitrary/sparseArray.ts:23](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/sparseArray.ts#L23)
Constraints to be applied on [sparseArray](../functions/sparseArray.md)
### Remarks
Since 2.13.0
### Properties
#### depthIdentifier? {#depthidentifier}
> `optional` **depthIdentifier?**: `string` \| [`DepthIdentifier`](../type-aliases/DepthIdentifier.md)
Defined in: [packages/fast-check/src/arbitrary/sparseArray.ts:66](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/sparseArray.ts#L66)
When receiving a depth identifier, the arbitrary will impact the depth
attached to it to avoid going too deep if it already generated lots of items.
In other words, if the number of generated values within the collection is large
then the generated items will tend to be less deep to avoid creating structures a lot
larger than expected.
For the moment, the depth is not taken into account to compute the number of items to
define for a precise generate call of the array. Just applied onto eligible items.
##### Remarks
Since 2.25.0
***
#### maxLength? {#maxlength}
> `optional` **maxLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/sparseArray.ts:29](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/sparseArray.ts#L29)
Upper bound of the generated array size (maximal size: 4294967295)
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 2.13.0
***
#### maxNumElements? {#maxnumelements}
> `optional` **maxNumElements?**: `number`
Defined in: [packages/fast-check/src/arbitrary/sparseArray.ts:41](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/sparseArray.ts#L41)
Upper bound of the number of non-hole elements
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 2.13.0
***
#### minNumElements? {#minnumelements}
> `optional` **minNumElements?**: `number`
Defined in: [packages/fast-check/src/arbitrary/sparseArray.ts:35](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/sparseArray.ts#L35)
Lower bound of the number of non-hole elements
##### Default Value
```ts
0
```
##### Remarks
Since 2.13.0
***
#### noTrailingHole? {#notrailinghole}
> `optional` **noTrailingHole?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/sparseArray.ts:47](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/sparseArray.ts#L47)
When enabled, all generated arrays will either be the empty array or end by a non-hole
##### Default Value
```ts
false
```
##### Remarks
Since 2.13.0
***
#### size? {#size}
> `optional` **size?**: [`SizeForArbitrary`](../type-aliases/SizeForArbitrary.md)
Defined in: [packages/fast-check/src/arbitrary/sparseArray.ts:52](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/sparseArray.ts#L52)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
---
## Interface: StringSharedConstraints
Defined in: [packages/fast-check/src/arbitrary/\_shared/StringSharedConstraints.ts:8](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_shared/StringSharedConstraints.ts#L8)
Constraints to be applied on arbitraries for strings
### Remarks
Since 2.4.0
### Properties
#### maxLength? {#maxlength}
> `optional` **maxLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/\_shared/StringSharedConstraints.ts:20](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_shared/StringSharedConstraints.ts#L20)
Upper bound of the generated string length (included)
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 2.4.0
***
#### minLength? {#minlength}
> `optional` **minLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/\_shared/StringSharedConstraints.ts:14](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_shared/StringSharedConstraints.ts#L14)
Lower bound of the generated string length (included)
##### Default Value
```ts
0
```
##### Remarks
Since 2.4.0
***
#### size? {#size}
> `optional` **size?**: [`SizeForArbitrary`](../type-aliases/SizeForArbitrary.md)
Defined in: [packages/fast-check/src/arbitrary/\_shared/StringSharedConstraints.ts:25](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_shared/StringSharedConstraints.ts#L25)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
---
## Interface: SubarrayConstraints
Defined in: [packages/fast-check/src/arbitrary/subarray.ts:9](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/subarray.ts#L9)
Constraints to be applied on [subarray](../functions/subarray.md)
### Remarks
Since 2.4.0
### Properties
#### maxLength? {#maxlength}
> `optional` **maxLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/subarray.ts:21](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/subarray.ts#L21)
Upper bound of the generated subarray size (included)
##### Default Value
```ts
The length of the original array itself
```
##### Remarks
Since 2.4.0
***
#### minLength? {#minlength}
> `optional` **minLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/subarray.ts:15](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/subarray.ts#L15)
Lower bound of the generated subarray size (included)
##### Default Value
```ts
0
```
##### Remarks
Since 2.4.0
---
## Interface: UuidConstraints
Defined in: [packages/fast-check/src/arbitrary/uuid.ts:13](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uuid.ts#L13)
Constraints to be applied on [uuid](../functions/uuid.md)
### Remarks
Since 3.21.0
### Properties
#### version? {#version}
> `optional` **version?**: `1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` \| `10` \| `11` \| `12` \| `13` \| `14` \| `15` \| (`1` \| `2` \| `3` \| `4` \| `5` \| `6` \| `7` \| `8` \| `9` \| `10` \| `11` \| `12` \| `13` \| `14` \| `15`)[]
Defined in: [packages/fast-check/src/arbitrary/uuid.ts:19](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uuid.ts#L19)
Define accepted versions in the [1-15] according to [RFC 9562](https://datatracker.ietf.org/doc/html/rfc9562#name-version-field)
##### Default Value
```ts
[1,2,3,4,5,6,7,8]
```
##### Remarks
Since 3.21.0
---
## Interface: WebAuthorityConstraints
Defined in: [packages/fast-check/src/arbitrary/webAuthority.ts:55](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webAuthority.ts#L55)
Constraints to be applied on [webAuthority](../functions/webAuthority.md)
### Remarks
Since 1.14.0
### Properties
#### size? {#size}
> `optional` **size?**: `RelativeSize` \| [`Size`](../type-aliases/Size.md)
Defined in: [packages/fast-check/src/arbitrary/webAuthority.ts:90](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webAuthority.ts#L90)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
***
#### withIPv4? {#withipv4}
> `optional` **withIPv4?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/webAuthority.ts:61](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webAuthority.ts#L61)
Enable IPv4 in host
##### Default Value
```ts
false
```
##### Remarks
Since 1.14.0
***
#### withIPv4Extended? {#withipv4extended}
> `optional` **withIPv4Extended?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/webAuthority.ts:73](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webAuthority.ts#L73)
Enable extended IPv4 format
##### Default Value
```ts
false
```
##### Remarks
Since 1.17.0
***
#### withIPv6? {#withipv6}
> `optional` **withIPv6?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/webAuthority.ts:67](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webAuthority.ts#L67)
Enable IPv6 in host
##### Default Value
```ts
false
```
##### Remarks
Since 1.14.0
***
#### withPort? {#withport}
> `optional` **withPort?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/webAuthority.ts:85](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webAuthority.ts#L85)
Enable port suffix
##### Default Value
```ts
false
```
##### Remarks
Since 1.14.0
***
#### withUserInfo? {#withuserinfo}
> `optional` **withUserInfo?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/webAuthority.ts:79](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webAuthority.ts#L79)
Enable user information prefix
##### Default Value
```ts
false
```
##### Remarks
Since 1.14.0
---
## Interface: WebFragmentsConstraints
Defined in: [packages/fast-check/src/arbitrary/webFragments.ts:10](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webFragments.ts#L10)
Constraints to be applied on [webFragments](../functions/webFragments.md)
### Remarks
Since 2.22.0
### Properties
#### size? {#size}
> `optional` **size?**: `RelativeSize` \| [`Size`](../type-aliases/Size.md)
Defined in: [packages/fast-check/src/arbitrary/webFragments.ts:15](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webFragments.ts#L15)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
---
## Interface: WebPathConstraints
Defined in: [packages/fast-check/src/arbitrary/webPath.ts:11](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webPath.ts#L11)
Constraints to be applied on [webPath](../functions/webPath.md)
### Remarks
Since 3.3.0
### Properties
#### size? {#size}
> `optional` **size?**: `RelativeSize` \| [`Size`](../type-aliases/Size.md)
Defined in: [packages/fast-check/src/arbitrary/webPath.ts:16](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webPath.ts#L16)
Define how large the generated values should be (at max)
##### Remarks
Since 3.3.0
---
## Interface: WebQueryParametersConstraints
Defined in: [packages/fast-check/src/arbitrary/webQueryParameters.ts:10](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webQueryParameters.ts#L10)
Constraints to be applied on [webQueryParameters](../functions/webQueryParameters.md)
### Remarks
Since 2.22.0
### Properties
#### size? {#size}
> `optional` **size?**: `RelativeSize` \| [`Size`](../type-aliases/Size.md)
Defined in: [packages/fast-check/src/arbitrary/webQueryParameters.ts:15](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webQueryParameters.ts#L15)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
---
## Interface: WebSegmentConstraints
Defined in: [packages/fast-check/src/arbitrary/webSegment.ts:11](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webSegment.ts#L11)
Constraints to be applied on [webSegment](../functions/webSegment.md)
### Remarks
Since 2.22.0
### Properties
#### size? {#size}
> `optional` **size?**: `RelativeSize` \| [`Size`](../type-aliases/Size.md)
Defined in: [packages/fast-check/src/arbitrary/webSegment.ts:16](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webSegment.ts#L16)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
---
## Interface: WebUrlConstraints
Defined in: [packages/fast-check/src/arbitrary/webUrl.ts:20](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webUrl.ts#L20)
Constraints to be applied on [webUrl](../functions/webUrl.md)
### Remarks
Since 1.14.0
### Properties
#### authoritySettings? {#authoritysettings}
> `optional` **authoritySettings?**: [`WebAuthorityConstraints`](WebAuthorityConstraints.md)
Defined in: [packages/fast-check/src/arbitrary/webUrl.ts:32](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webUrl.ts#L32)
Settings for [webAuthority](../functions/webAuthority.md)
##### Default Value
```ts
{}
```
##### Remarks
Since 1.14.0
***
#### size? {#size}
> `optional` **size?**: `RelativeSize` \| [`Size`](../type-aliases/Size.md)
Defined in: [packages/fast-check/src/arbitrary/webUrl.ts:49](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webUrl.ts#L49)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
***
#### validSchemes? {#validschemes}
> `optional` **validSchemes?**: `string`[]
Defined in: [packages/fast-check/src/arbitrary/webUrl.ts:26](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webUrl.ts#L26)
Enforce specific schemes, eg.: http, https
##### Default Value
```ts
['http', 'https']
```
##### Remarks
Since 1.14.0
***
#### withFragments? {#withfragments}
> `optional` **withFragments?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/webUrl.ts:44](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webUrl.ts#L44)
Enable fragments in the generated url
##### Default Value
```ts
false
```
##### Remarks
Since 1.14.0
***
#### withQueryParameters? {#withqueryparameters}
> `optional` **withQueryParameters?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/webUrl.ts:38](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/webUrl.ts#L38)
Enable query parameters in the generated url
##### Default Value
```ts
false
```
##### Remarks
Since 1.14.0
---
## Interface: WeightedArbitrary\
Defined in: [packages/fast-check/src/arbitrary/oneof.ts:15](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/oneof.ts#L15)
Conjonction of a weight and an arbitrary used by [oneof](../functions/oneof.md)
in order to generate values
### Remarks
Since 1.18.0
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Properties
#### arbitrary {#arbitrary}
> **arbitrary**: [`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/oneof.ts:25](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/oneof.ts#L25)
Instance of Arbitrary
##### Remarks
Since 0.0.7
***
#### weight {#weight}
> **weight**: `number`
Defined in: [packages/fast-check/src/arbitrary/oneof.ts:20](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/oneof.ts#L20)
Weight to be applied when selecting which arbitrary should be used
##### Remarks
Since 0.0.7
---
## Interface: WithCloneMethod\
Defined in: [packages/fast-check/src/check/symbols.ts:21](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/symbols.ts#L21)
Object instance that should be cloned from one generation/shrink to another
### Remarks
Since 2.15.0
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Properties
#### \[cloneMethod\] {#clonemethod}
> **\[cloneMethod\]**: () => `T`
Defined in: [packages/fast-check/src/check/symbols.ts:22](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/symbols.ts#L22)
##### Returns
`T`
---
## ~~Type Alias: AsyncPropertyHookFunction~~
> **AsyncPropertyHookFunction** = ((`previousHookFunction`) => `Promise`\<`unknown`\>) \| ((`previousHookFunction`) => `void`)
Defined in: [packages/fast-check/src/check/property/AsyncProperty.generic.ts:24](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/AsyncProperty.generic.ts#L24)
Type of legal hook function that can be used to call `beforeEach` or `afterEach`
on a [IAsyncPropertyWithHooks](../interfaces/IAsyncPropertyWithHooks.md)
### Deprecated
Prefer `beforeEach` and/or `afterEach` plugins: `fc.assert(property, { plugins: [fc.beforeEach(fn)] })`
### Remarks
Since 2.2.0
---
## Type Alias: BigIntArrayConstraints
> **BigIntArrayConstraints** = `object`
Defined in: [packages/fast-check/src/arbitrary/\_internals/builders/TypedIntArrayArbitraryBuilder.ts:84](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts#L84)
Constraints to be applied on typed arrays for big int values
### Remarks
Since 3.0.0
### Properties
#### max? {#max}
> `optional` **max?**: `bigint`
Defined in: [packages/fast-check/src/arbitrary/\_internals/builders/TypedIntArrayArbitraryBuilder.ts:108](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts#L108)
Upper bound for the generated int (included)
##### Default Value
```ts
highest possible value for this type
```
##### Remarks
Since 3.0.0
***
#### maxLength? {#maxlength}
> `optional` **maxLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/\_internals/builders/TypedIntArrayArbitraryBuilder.ts:96](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts#L96)
Upper bound of the generated array size
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 3.0.0
***
#### min? {#min}
> `optional` **min?**: `bigint`
Defined in: [packages/fast-check/src/arbitrary/\_internals/builders/TypedIntArrayArbitraryBuilder.ts:102](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts#L102)
Lower bound for the generated int (included)
##### Default Value
```ts
smallest possible value for this type
```
##### Remarks
Since 3.0.0
***
#### minLength? {#minlength}
> `optional` **minLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/\_internals/builders/TypedIntArrayArbitraryBuilder.ts:90](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts#L90)
Lower bound of the generated array size
##### Default Value
```ts
0
```
##### Remarks
Since 3.0.0
***
#### size? {#size}
> `optional` **size?**: [`SizeForArbitrary`](SizeForArbitrary.md)
Defined in: [packages/fast-check/src/arbitrary/\_internals/builders/TypedIntArrayArbitraryBuilder.ts:113](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts#L113)
Define how large the generated values should be (at max)
##### Remarks
Since 3.0.0
---
## Type Alias: CloneValue\
> **CloneValue**\<`T`, `N`, `Rest`\> = \[`number`\] *extends* \[`N`\] ? `T`[] : `Rest`\[`"length"`\] *extends* `N` ? `Rest` : `CloneValue`\<`T`, `N`, \[`T`, `...Rest`\]\>
Defined in: [packages/fast-check/src/arbitrary/clone.ts:9](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/clone.ts#L9)
Type of the value produced by [clone](../functions/clone.md)
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `T` | - |
| `N` *extends* `number` | - |
| `Rest` *extends* `T`[] | \[\] |
### Remarks
Since 2.5.0
---
## Type Alias: DepthContext
> **DepthContext** = `object`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/DepthContext.ts:28](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/DepthContext.ts#L28)
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}
> **depth**: `number`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/DepthContext.ts:38](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/DepthContext.ts#L38)
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.
---
## Type Alias: DepthIdentifier
> **DepthIdentifier** = `object` & [`DepthContext`](DepthContext.md)
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/DepthContext.ts:16](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/DepthContext.ts#L16)
Type used to strongly type instances of depth identifier while keeping internals
what they contain internally
### Type Declaration
#### \[depthIdentifierSymbol\]
> **\[depthIdentifierSymbol\]**: `true`
**`Internal`**
### Remarks
Since 2.25.0
---
## Type Alias: DepthSize
> **DepthSize** = `RelativeSize` \| [`Size`](Size.md) \| `"max"` \| `number` \| `undefined`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/MaxLengthFromMinLength.ts:68](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/MaxLengthFromMinLength.ts#L68)
Superset of [Size](Size.md) to override the default defined for size.
It can either be based on a numeric value manually selected by the user (not recommended)
or rely on presets based on size (recommended).
This size will be used to infer a bias to limit the depth, used as follow within recursive structures:
While going deeper, the bias on depth will increase the probability to generate small instances.
When used with [Size](Size.md), the larger the size the deeper the structure.
When used with numeric values, the larger the number (floating point number >= 0),
the deeper the structure. `+0` means extremelly biased depth meaning barely impossible to generate
deep structures, while `Number.POSITIVE_INFINITY` means "depth has no impact".
Using `max` or `Number.POSITIVE_INFINITY` is fully equivalent.
### Remarks
Since 2.25.0
---
## Type Alias: EntityGraphArbitraries\
> **EntityGraphArbitraries**\<`TEntityFields`\> = `{ [TEntityName in keyof TEntityFields]: ArbitraryStructure }`
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/EntityGraphTypes.ts:38](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/EntityGraphTypes.ts#L38)
Defines all entity types and their data fields for [entityGraph](../functions/entityGraph.md).
This is the first argument to [entityGraph](../functions/entityGraph.md) and specifies the non-relational properties
of each entity type. Each key is the name of an entity type and its value defines the
arbitraries for that entity.
### Type Parameters
| Type Parameter |
| ------ |
| `TEntityFields` |
### Example
```typescript
{
employee: { name: fc.string(), age: fc.nat(100) },
team: { name: fc.string(), size: fc.nat(50) }
}
```
### Remarks
Since 4.5.0
---
## Type Alias: EntityGraphConstraints\
> **EntityGraphConstraints**\<`TEntityFields`\> = `object`
Defined in: [packages/fast-check/src/arbitrary/entityGraph.ts:20](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/entityGraph.ts#L20)
Constraints to be applied on [entityGraph](../functions/entityGraph.md)
### Remarks
Since 4.5.0
### Type Parameters
| Type Parameter |
| ------ |
| `TEntityFields` |
### Properties
#### initialPoolConstraints? {#initialpoolconstraints}
> `optional` **initialPoolConstraints?**: `{ [EntityName in keyof TEntityFields]?: ArrayConstraints }`
Defined in: [packages/fast-check/src/arbitrary/entityGraph.ts:37](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/entityGraph.ts#L37)
Controls the minimum number of entities generated for each entity type in the initial pool.
The initial pool defines the baseline set of entities that are created before any relationships
are established. Other entities may be created later to satisfy relationship requirements.
##### Example
```typescript
// Ensure at least 2 employees and at most 5 teams in the initial pool
// But possibly more than 5 teams at the end
{ initialPoolConstraints: { employee: { minLength: 2 }, team: { maxLength: 5 } } }
```
##### Default Value
When unspecified, defaults from [array](../functions/array.md) are used for each entity type
##### Remarks
Since 4.5.0
***
#### noNullPrototype? {#nonullprototype}
> `optional` **noNullPrototype?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/entityGraph.ts:64](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/entityGraph.ts#L64)
Do not generate values with null prototype
##### Default Value
```ts
false
```
##### Remarks
Since 4.5.0
***
#### unicityConstraints? {#unicityconstraints}
> `optional` **unicityConstraints?**: `{ [EntityName in keyof TEntityFields]?: UniqueArrayConstraintsRecommended["selector"] }`
Defined in: [packages/fast-check/src/arbitrary/entityGraph.ts:53](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/entityGraph.ts#L53)
Defines uniqueness criteria for entities of each type to prevent duplicate values.
The selector function extracts a key from each entity. Entities with identical keys
(compared using `Object.is`) are considered duplicates and only one instance will be kept.
##### Example
```typescript
// Ensure employees have unique names
{ unicityConstraints: { employee: (emp) => emp.name } }
```
##### Default Value
```ts
All entities are considered unique (no deduplication is performed)
```
##### Remarks
Since 4.5.0
---
## ~~Type Alias: EntityGraphContraints\~~
> **EntityGraphContraints**\<`TEntityFields`\> = [`EntityGraphConstraints`](EntityGraphConstraints.md)\<`TEntityFields`\>
Defined in: [packages/fast-check/src/arbitrary/entityGraph.ts:73](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/entityGraph.ts#L73)
Constraints to be applied on [entityGraph](../functions/entityGraph.md)
### Type Parameters
| Type Parameter |
| ------ |
| `TEntityFields` |
### Remarks
Since 4.5.0
### Deprecated
This type has a typo. Use `EntityGraphConstraints` instead.
---
## Type Alias: EntityGraphRelations\
> **EntityGraphRelations**\<`TEntityFields`\> = `{ [TEntityName in keyof TEntityFields]: { [TField in string]: Relationship } }`
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/EntityGraphTypes.ts:165](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/EntityGraphTypes.ts#L165)
Defines all relationships between entity types for [entityGraph](../functions/entityGraph.md).
This is the second argument to [entityGraph](../functions/entityGraph.md) and specifies how entities reference each other.
Each entity type can have zero or more relationship fields, where each field defines a link
to other entities.
### Type Parameters
| Type Parameter |
| ------ |
| `TEntityFields` |
### Example
```typescript
{
employee: {
manager: { arity: '0-1', type: 'employee' },
team: { arity: '1', type: 'team' }
},
team: {}
}
```
### Remarks
Since 4.5.0
---
## Type Alias: EntityGraphValue\
> **EntityGraphValue**\<`TEntityFields`, `TEntityRelations`\> = `{ [TEntityName in keyof EntityGraphSingleValue]: EntityGraphSingleValue[TEntityName][] }`
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/EntityGraphTypes.ts:199](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/EntityGraphTypes.ts#L199)
Type of the values generated by [entityGraph](../functions/entityGraph.md).
The output is an object where each key is an entity type name and each value is an array
of entities of that type. Each entity contains both its data fields (from arbitraries) and
relationship fields (from relations), with relationships resolved to actual entity references.
### Type Parameters
| Type Parameter |
| ------ |
| `TEntityFields` |
| `TEntityRelations` *extends* [`EntityGraphRelations`](EntityGraphRelations.md)\<`TEntityFields`\> |
### Remarks
Since 4.5.0
---
## Type Alias: FalsyValue\
> **FalsyValue**\<`TConstraints`\> = `false` \| `null` \| `0` \| `""` \| *typeof* `NaN` \| `undefined` \| `TConstraints` *extends* `object` ? `0n` : `never`
Defined in: [packages/fast-check/src/arbitrary/falsy.ts:23](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/falsy.ts#L23)
Typing for values generated by [falsy](../functions/falsy.md)
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `TConstraints` *extends* [`FalsyContraints`](../interfaces/FalsyContraints.md) | `object` |
### Remarks
Since 2.2.0
---
## Type Alias: Float32ArrayConstraints
> **Float32ArrayConstraints** = `object` & [`FloatConstraints`](../interfaces/FloatConstraints.md)
Defined in: [packages/fast-check/src/arbitrary/float32Array.ts:13](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/float32Array.ts#L13)
Constraints to be applied on [float32Array](../functions/float32Array.md)
### Type Declaration
#### maxLength?
> `optional` **maxLength?**: `number`
Upper bound of the generated array size
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 2.9.0
#### minLength?
> `optional` **minLength?**: `number`
Lower bound of the generated array size
##### Default Value
```ts
0
```
##### Remarks
Since 2.9.0
#### size?
> `optional` **size?**: [`SizeForArbitrary`](SizeForArbitrary.md)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
### Remarks
Since 2.9.0
---
## Type Alias: Float64ArrayConstraints
> **Float64ArrayConstraints** = `object` & [`DoubleConstraints`](../interfaces/DoubleConstraints.md)
Defined in: [packages/fast-check/src/arbitrary/float64Array.ts:13](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/float64Array.ts#L13)
Constraints to be applied on [float64Array](../functions/float64Array.md)
### Type Declaration
#### maxLength?
> `optional` **maxLength?**: `number`
Upper bound of the generated array size
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 2.9.0
#### minLength?
> `optional` **minLength?**: `number`
Lower bound of the generated array size
##### Default Value
```ts
0
```
##### Remarks
Since 2.9.0
#### size?
> `optional` **size?**: [`SizeForArbitrary`](SizeForArbitrary.md)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
### Remarks
Since 2.9.0
---
## Type Alias: GeneratorValue
> **GeneratorValue** = `GeneratorValueFunction` & `GeneratorValueMethods`
Defined in: [packages/fast-check/src/arbitrary/\_internals/builders/GeneratorValueBuilder.ts:45](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/builders/GeneratorValueBuilder.ts#L45)
An instance of GeneratorValue can be leveraged within predicates themselves to produce extra random values
while preserving part of the shrinking capabilities on the produced values.
It can be seen as a way to start property based testing within something looking closer from what users will
think about when thinking about random in tests. But contrary to raw random, it comes with many useful strengths
such as: ability to re-run the test (seeded), shrinking...
### Remarks
Since 3.8.0
---
## Type Alias: GlobalAsyncPropertyHookFunction
> **GlobalAsyncPropertyHookFunction** = (() => `Promise`\<`unknown`\>) \| (() => `void`)
Defined in: [packages/fast-check/src/check/runner/configuration/GlobalParameters.ts:20](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/GlobalParameters.ts#L20)
Type of legal hook function that can be used in the global parameter `asyncBeforeEach` and/or `asyncAfterEach`
Prefer `beforeEach` and/or `afterEach` plugins: `fc.assert(property, { plugins: [fc.beforeEach(fn)] })`
### Remarks
Since 2.3.0
---
## Type Alias: GlobalParameters
> **GlobalParameters** = `Pick`\<[`Parameters`](../interfaces/Parameters.md)\<`unknown`\>, `Exclude`\, `"path"` \| `"examples"` \| `"plugins"`\>\> & `object`
Defined in: [packages/fast-check/src/check/runner/configuration/GlobalParameters.ts:27](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/GlobalParameters.ts#L27)
Type describing the global overrides
### Type Declaration
#### ~~afterEach?~~
> `optional` **afterEach?**: [`GlobalPropertyHookFunction`](GlobalPropertyHookFunction.md)
Specify a function that will be called after each execution of a property.
It behaves as-if you manually called `afterEach` method on all the properties you execute with fast-check.
The function will be used for both fast-check#property and fast-check#asyncProperty.
This global override should never be used in conjunction with `asyncAfterEach`.
##### Deprecated
Prefer the life-cycle plugins: `fc.installGlobalPlugin(fc.afterEach(fn))`
##### Remarks
Since 2.3.0
#### ~~asyncAfterEach?~~
> `optional` **asyncAfterEach?**: [`GlobalAsyncPropertyHookFunction`](GlobalAsyncPropertyHookFunction.md)
Specify a function that will be called after each execution of an asynchronous property.
It behaves as-if you manually called `afterEach` method on all the asynchronous properties you execute with fast-check.
The function will be used only for fast-check#asyncProperty. It makes synchronous properties created by fast-check#property unable to run.
This global override should never be used in conjunction with `afterEach`.
##### Deprecated
Prefer the life-cycle plugins: `fc.installGlobalPlugin(fc.afterEach(fn))`
##### Remarks
Since 2.3.0
#### ~~asyncBeforeEach?~~
> `optional` **asyncBeforeEach?**: [`GlobalAsyncPropertyHookFunction`](GlobalAsyncPropertyHookFunction.md)
Specify a function that will be called before each execution of an asynchronous property.
It behaves as-if you manually called `beforeEach` method on all the asynchronous properties you execute with fast-check.
The function will be used only for fast-check#asyncProperty. It makes synchronous properties created by fast-check#property unable to run.
This global override should never be used in conjunction with `beforeEach`.
##### Deprecated
Prefer the life-cycle plugins: `fc.installGlobalPlugin(fc.beforeEach(fn))`
##### Remarks
Since 2.3.0
#### baseSize?
> `optional` **baseSize?**: [`Size`](Size.md)
Define the base size to be used by arbitraries.
By default arbitraries not specifying any size will default to it (except in some cases when used defaultSizeToMaxWhenMaxSpecified is true).
For some arbitraries users will want to override the default and either define another size relative to this one,
or a fixed one.
##### Default Value
`"small"`
##### Remarks
Since 2.22.0
#### ~~beforeEach?~~
> `optional` **beforeEach?**: [`GlobalPropertyHookFunction`](GlobalPropertyHookFunction.md)
Specify a function that will be called before each execution of a property.
It behaves as-if you manually called `beforeEach` method on all the properties you execute with fast-check.
The function will be used for both fast-check#property and fast-check#asyncProperty.
This global override should never be used in conjunction with `asyncBeforeEach`.
##### Deprecated
Prefer the life-cycle plugins: `fc.installGlobalPlugin(fc.beforeEach(fn))`
##### Remarks
Since 2.3.0
#### defaultSizeToMaxWhenMaxSpecified?
> `optional` **defaultSizeToMaxWhenMaxSpecified?**: `boolean`
When set to `true` and if the size has not been defined for this precise instance,
it will automatically default to `"max"` if the user specified a upper bound for the range
(applies to length and to depth).
When `false`, the size will be defaulted to `baseSize` even if the user specified
a upper bound for the range.
##### Remarks
Since 2.22.0
### Remarks
Since 1.18.0
---
## Type Alias: GlobalPropertyHookFunction
> **GlobalPropertyHookFunction** = () => `void`
Defined in: [packages/fast-check/src/check/runner/configuration/GlobalParameters.ts:13](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/GlobalParameters.ts#L13)
Type of legal hook function that can be used in the global parameter `beforeEach` and/or `afterEach`
Prefer `beforeEach` and/or `afterEach` plugins: `fc.assert(property, { plugins: [fc.beforeEach(fn)] })`
### Returns
`void`
### Remarks
Since 2.3.0
---
## Type Alias: IntArrayConstraints
> **IntArrayConstraints** = `object`
Defined in: [packages/fast-check/src/arbitrary/\_internals/builders/TypedIntArrayArbitraryBuilder.ts:47](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts#L47)
Constraints to be applied on typed arrays for integer values
### Remarks
Since 2.9.0
### Properties
#### max? {#max}
> `optional` **max?**: `number`
Defined in: [packages/fast-check/src/arbitrary/\_internals/builders/TypedIntArrayArbitraryBuilder.ts:71](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts#L71)
Upper bound for the generated int (included)
##### Default Value
```ts
highest possible value for this type
```
##### Remarks
Since 2.9.0
***
#### maxLength? {#maxlength}
> `optional` **maxLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/\_internals/builders/TypedIntArrayArbitraryBuilder.ts:59](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts#L59)
Upper bound of the generated array size
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 2.9.0
***
#### min? {#min}
> `optional` **min?**: `number`
Defined in: [packages/fast-check/src/arbitrary/\_internals/builders/TypedIntArrayArbitraryBuilder.ts:65](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts#L65)
Lower bound for the generated int (included)
##### Default Value
```ts
smallest possible value for this type
```
##### Remarks
Since 2.9.0
***
#### minLength? {#minlength}
> `optional` **minLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/\_internals/builders/TypedIntArrayArbitraryBuilder.ts:53](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts#L53)
Lower bound of the generated array size
##### Default Value
```ts
0
```
##### Remarks
Since 2.9.0
***
#### size? {#size}
> `optional` **size?**: [`SizeForArbitrary`](SizeForArbitrary.md)
Defined in: [packages/fast-check/src/arbitrary/\_internals/builders/TypedIntArrayArbitraryBuilder.ts:76](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/builders/TypedIntArrayArbitraryBuilder.ts#L76)
Define how large the generated values should be (at max)
##### Remarks
Since 2.22.0
---
## Type Alias: InterruptAfterTimeLimitOptions
> **InterruptAfterTimeLimitOptions** = `object`
Defined in: [packages/fast-check/src/check/plugin/InterruptAfterTimeLimitPlugin.ts:50](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/InterruptAfterTimeLimitPlugin.ts#L50)
Options for [interruptAfterTimeLimit](../functions/interruptAfterTimeLimit.md)
### Remarks
Since 4.10.0
### Properties
#### failOnInterrupt? {#failoninterrupt}
> `optional` **failOnInterrupt?**: `boolean`
Defined in: [packages/fast-check/src/check/plugin/InterruptAfterTimeLimitPlugin.ts:58](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/InterruptAfterTimeLimitPlugin.ts#L58)
Whether an interruption triggered by this plugin should be reported as a failure.
When set to `true`, a property interrupted before reaching `numRuns` is reported as a failure.
##### Default Value
`false`
##### Remarks
Since 4.10.0
---
## Type Alias: JsonValue
> **JsonValue** = `boolean` \| `number` \| `string` \| `null` \| `JsonArray` \| `JsonObject`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/JsonConstraintsBuilder.ts:85](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/JsonConstraintsBuilder.ts#L85)
Typings for a Json value
### Remarks
Since 2.20.0
---
## Type Alias: LetrecLooselyTypedBuilder\
> **LetrecLooselyTypedBuilder**\<`T`\> = (`tie`) => [`LetrecValue`](LetrecValue.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/letrec.ts:51](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/letrec.ts#L51)
Loosely typed type for the `builder` function passed to [letrec](../functions/letrec.md).
You may want also want to use its strongly typed version [LetrecTypedBuilder](LetrecTypedBuilder.md).
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type |
| ------ | ------ |
| `tie` | [`LetrecLooselyTypedTie`](LetrecLooselyTypedTie.md) |
### Returns
[`LetrecValue`](LetrecValue.md)\<`T`\>
### Remarks
Since 3.0.0
---
## Type Alias: LetrecLooselyTypedTie
> **LetrecLooselyTypedTie** = (`key`) => [`Arbitrary`](../classes/Arbitrary.md)\<`unknown`\>
Defined in: [packages/fast-check/src/arbitrary/letrec.ts:43](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/letrec.ts#L43)
Loosely typed type for the `tie` function passed by [letrec](../functions/letrec.md) to the `builder` function we pass to it.
You may want also want to use its strongly typed version [LetrecTypedTie](../interfaces/LetrecTypedTie.md).
### Parameters
| Parameter | Type |
| ------ | ------ |
| `key` | `string` |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`unknown`\>
### Remarks
Since 3.0.0
---
## Type Alias: LetrecTypedBuilder\
> **LetrecTypedBuilder**\<`T`\> = (`tie`) => [`LetrecValue`](LetrecValue.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/letrec.ts:34](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/letrec.ts#L34)
Strongly typed type for the `builder` function passed to [letrec](../functions/letrec.md).
You may want also want to use its loosely typed version [LetrecLooselyTypedBuilder](LetrecLooselyTypedBuilder.md).
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type |
| ------ | ------ |
| `tie` | [`LetrecTypedTie`](../interfaces/LetrecTypedTie.md)\<`T`\> |
### Returns
[`LetrecValue`](LetrecValue.md)\<`T`\>
### Remarks
Since 3.0.0
---
## Type Alias: LetrecValue\
> **LetrecValue**\<`T`\> = `{ [K in keyof T]: Arbitrary }`
Defined in: [packages/fast-check/src/arbitrary/letrec.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/letrec.ts#L12)
Type of the value produced by [letrec](../functions/letrec.md)
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Remarks
Since 3.0.0
---
## Type Alias: MaybeWeightedArbitrary\
> **MaybeWeightedArbitrary**\<`T`\> = [`Arbitrary`](../classes/Arbitrary.md)\<`T`\> \| [`WeightedArbitrary`](../interfaces/WeightedArbitrary.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/oneof.ts:33](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/oneof.ts#L33)
Either an `Arbitrary` or a `WeightedArbitrary`
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Remarks
Since 3.0.0
---
## Type Alias: Memo\
> **Memo**\<`T`\> = (`maxDepth?`) => [`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
Defined in: [packages/fast-check/src/arbitrary/memo.ts:9](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/memo.ts#L9)
Output type for [memo](../functions/memo.md)
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Parameters
| Parameter | Type |
| ------ | ------ |
| `maxDepth?` | `number` |
### Returns
[`Arbitrary`](../classes/Arbitrary.md)\<`T`\>
### Remarks
Since 1.16.0
---
## Type Alias: ModelRunAsyncSetup\
> **ModelRunAsyncSetup**\<`Model`, `Real`\> = () => `Promise`\<\{ `model`: `Model`; `real`: `Real`; \}\>
Defined in: [packages/fast-check/src/check/model/ModelRunner.ts:19](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/ModelRunner.ts#L19)
Asynchronous definition of model and real
### Type Parameters
| Type Parameter |
| ------ |
| `Model` |
| `Real` |
### Returns
`Promise`\<\{ `model`: `Model`; `real`: `Real`; \}\>
### Remarks
Since 2.2.0
---
## Type Alias: ModelRunSetup\
> **ModelRunSetup**\<`Model`, `Real`\> = () => `object`
Defined in: [packages/fast-check/src/check/model/ModelRunner.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/model/ModelRunner.ts#L12)
Synchronous definition of model and real
### Type Parameters
| Type Parameter |
| ------ |
| `Model` |
| `Real` |
### Returns
`object`
#### model
> **model**: `Model`
#### real
> **real**: `Real`
### Remarks
Since 2.2.0
---
## Type Alias: OneOfConstraints
> **OneOfConstraints** = `object`
Defined in: [packages/fast-check/src/arbitrary/oneof.ts:51](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/oneof.ts#L51)
Constraints to be applied on [oneof](../functions/oneof.md)
### Remarks
Since 2.14.0
### Properties
#### depthIdentifier? {#depthidentifier}
> `optional` **depthIdentifier?**: [`DepthIdentifier`](DepthIdentifier.md) \| `string`
Defined in: [packages/fast-check/src/arbitrary/oneof.ts:87](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/oneof.ts#L87)
Depth identifier can be used to share the current depth between several instances.
By default, if not specified, each instance of oneof will have its own depth.
In other words: you can have depth=1 in one while you have depth=100 in another one.
##### Remarks
Since 2.14.0
***
#### depthSize? {#depthsize}
> `optional` **depthSize?**: [`DepthSize`](DepthSize.md)
Defined in: [packages/fast-check/src/arbitrary/oneof.ts:70](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/oneof.ts#L70)
While going deeper and deeper within a recursive structure (see [letrec](../functions/letrec.md)),
this factor will be used to increase the probability to generate instances
of the first passed arbitrary.
##### Remarks
Since 2.14.0
***
#### maxDepth? {#maxdepth}
> `optional` **maxDepth?**: `number`
Defined in: [packages/fast-check/src/arbitrary/oneof.ts:78](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/oneof.ts#L78)
Maximal authorized depth.
Once this depth has been reached only the first arbitrary will be used.
##### Default Value
Number.POSITIVE_INFINITY — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 2.14.0
***
#### withCrossShrink? {#withcrossshrink}
> `optional` **withCrossShrink?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/oneof.ts:62](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/oneof.ts#L62)
When set to true, the shrinker of oneof will try to check if the first arbitrary
could have been used to discover an issue. It allows to shrink trees.
Warning: First arbitrary must be the one resulting in the smallest structures
for usages in deep tree-like structures.
##### Default Value
```ts
false
```
##### Remarks
Since 2.14.0
---
## Type Alias: OneOfValue\
> **OneOfValue**\<`Ts`\> = `{ [K in keyof Ts]: Ts[K] extends MaybeWeightedArbitrary ? U : never }`\[`number`\]
Defined in: [packages/fast-check/src/arbitrary/oneof.ts:42](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/oneof.ts#L42)
Infer the type of the Arbitrary produced by [oneof](../functions/oneof.md)
given the type of the source arbitraries
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` *extends* [`MaybeWeightedArbitrary`](MaybeWeightedArbitrary.md)\<`unknown`\>[] |
### Remarks
Since 2.2.0
---
## Type Alias: Plugin\
> **Plugin**\<`Ts`\> = (`pluginIndex`, `pluginStore`) => [`PluginInstance`](PluginInstance.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/plugin/Plugin.ts:87](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/Plugin.ts#L87)
Builder instantiating a plugin.
Each property will instantiate its own plugin when starting to be assessed via [check](../functions/check.md) or [assert](../functions/assert.md).
Parameters received by the Plugin function:
- 1st argument or pluginIndex: Corresponds to the index of the plugin within the run (starts at zero).
Plugins are instantiated in order. As such, for a given batch expect to see index 0 instantiated first, followed by others.
- 2nd argument or pluginStore: Context parameter shared across all builders.
The store can be leveraged to exchange insights with other builders.
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Parameters
| Parameter | Type |
| ------ | ------ |
| `pluginIndex` | `number` |
| `pluginStore` | [`PluginStore`](PluginStore.md) |
### Returns
[`PluginInstance`](PluginInstance.md)\<`Ts`\>
### Remarks
Since 4.10.0
---
## Type Alias: PluginInstance\
> **PluginInstance**\<`Ts`\> = `object`
Defined in: [packages/fast-check/src/check/plugin/Plugin.ts:36](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/Plugin.ts#L36)
Runtime part of a plugin.
The runtime part is made of the hooks called by the runner.
Hooks will be called when relevant for the runner.
All the hooks are optional.
### Remarks
Since 4.10.0
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Properties
#### afterAll? {#afterall}
> `optional` **afterAll?**: () => `Promise`\<`void`\> \| `void`
Defined in: [packages/fast-check/src/check/plugin/Plugin.ts:71](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/Plugin.ts#L71)
Called once at the end of the full property assessment, after all other methods of the plugin.
Use it to clean up and release resources acquired by the plugin.
Every `afterAll` is guaranteed to run, even if an `onAllRunsComplete` or another `afterAll` threw.
In case several `onAllRunsComplete` or `afterAll` throw, only the first failure is reported, the others will be swallowed.
WARNING: Always return synchronously for synchronous properties.
##### Returns
`Promise`\<`void`\> \| `void`
##### Remarks
Since 4.10.0
***
#### decorateRun? {#decoraterun}
> `optional` **decorateRun?**: (`nestedRun`) => [`IRawProperty`](../interfaces/IRawProperty.md)\<`Ts`, `boolean`\>\[`"run"`\]
Defined in: [packages/fast-check/src/check/plugin/Plugin.ts:46](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/Plugin.ts#L46)
Enrich the execution of the predicate linked to the property with extra behaviors.
Called once per execution of the predicate.
WARNING: `nestedRun` never throws and neither should the function returned by `decorateRun`.
WARNING: If run returns synchronously, the decorated function must too.
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `nestedRun` | [`IRawProperty`](../interfaces/IRawProperty.md)\<`Ts`, `boolean`\>\[`"run"`\] |
##### Returns
[`IRawProperty`](../interfaces/IRawProperty.md)\<`Ts`, `boolean`\>\[`"run"`\]
##### Remarks
Since 4.10.0
***
#### onAllRunsComplete? {#onallrunscomplete}
> `optional` **onAllRunsComplete?**: (`runDetails`) => `Promise`\<`void`\> \| `void`
Defined in: [packages/fast-check/src/check/plugin/Plugin.ts:59](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/Plugin.ts#L59)
Called once at the end of the full property assessment, with the result of the execution.
Throwing allows you to override the default error reporting provided by [assert](../functions/assert.md).
Every `onAllRunsComplete` is guaranteed to run, even if another `onAllRunsComplete` threw.
In case several of them throw, only the first failure is reported, the others will be swallowed.
WARNING: Always return synchronously for synchronous properties.
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `runDetails` | [`RunDetails`](RunDetails.md)\<`Ts`\> |
##### Returns
`Promise`\<`void`\> \| `void`
##### Remarks
Since 4.10.0
---
## Type Alias: PluginStore
> **PluginStore** = `object`
Defined in: [packages/fast-check/src/check/plugin/Plugin.ts:11](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/Plugin.ts#L11)
Storage shared by all the plugins instantiated for one call to [check](../functions/check.md) or [assert](../functions/assert.md).
Use it to cooperate across plugins.
### Remarks
Since 4.10.0
### Properties
#### get {#get}
> **get**: \<`T`\>(`key`) => `T` \| `undefined`
Defined in: [packages/fast-check/src/check/plugin/Plugin.ts:17](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/Plugin.ts#L17)
Read the value registered for `key`, if any.
WARNING: `T` is declared by the caller, never checked by the store.
##### Type Parameters
| Type Parameter |
| ------ |
| `T` |
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `key` | `symbol` |
##### Returns
`T` \| `undefined`
##### Remarks
Since 4.10.0
***
#### set {#set}
> **set**: \<`T`\>(`key`, `value`) => `void`
Defined in: [packages/fast-check/src/check/plugin/Plugin.ts:22](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/plugin/Plugin.ts#L22)
Register `value` for `key`, replacing any previous value.
##### Type Parameters
| Type Parameter |
| ------ |
| `T` |
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `key` | `symbol` |
| `value` | `T` |
##### Returns
`void`
##### Remarks
Since 4.10.0
---
## Type Alias: PropertyFailure
> **PropertyFailure** = `object`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:13](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L13)
Represent failures of the property
### Remarks
Since 3.0.0
### Properties
#### error {#error}
> **error**: `unknown`
Defined in: [packages/fast-check/src/check/property/IRawProperty.ts:19](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/IRawProperty.ts#L19)
The original error that has been intercepted.
Possibly not an instance Error as users can throw anything.
##### Remarks
Since 3.0.0
---
## ~~Type Alias: PropertyHookFunction~~
> **PropertyHookFunction** = (`globalHookFunction`) => `void`
Defined in: [packages/fast-check/src/check/property/Property.generic.ts:24](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/property/Property.generic.ts#L24)
Type of legal hook function that can be used to call `beforeEach` or `afterEach`
on a [IPropertyWithHooks](../interfaces/IPropertyWithHooks.md)
### Parameters
| Parameter | Type |
| ------ | ------ |
| `globalHookFunction` | [`GlobalPropertyHookFunction`](GlobalPropertyHookFunction.md) |
### Returns
`void`
### Deprecated
Prefer `beforeEach` and/or `afterEach` plugins: `fc.assert(property, { plugins: [fc.beforeEach(fn)] })`
### Remarks
Since 2.2.0
---
## Type Alias: RandomGenerator
> **RandomGenerator** = `RandomGenerator7x` \| `RandomGenerator8x` \| `JumpableRandomGenerator8x`
Defined in: [packages/fast-check/src/random/generator/RandomGenerator.ts:20](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/random/generator/RandomGenerator.ts#L20)
Merged type supporting both pure-rand v7 and v8 random generators.
Keeping compatibility with v7 avoids a breaking API change and a new major version.
### Remarks
Since 4.6.0
---
## Type Alias: RandomType
> **RandomType** = `"mersenne"` \| `"congruential"` \| `"congruential32"` \| `"xorshift128plus"` \| `"xoroshiro128plus"`
Defined in: [packages/fast-check/src/check/runner/configuration/RandomType.ts:7](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/configuration/RandomType.ts#L7)
Random generators automatically recognized by the framework
without having to pass a builder function
### Remarks
Since 2.2.0
---
## Type Alias: RecordConstraints\
> **RecordConstraints**\<`T`\> = `object`
Defined in: [packages/fast-check/src/arbitrary/record.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/record.ts#L12)
Constraints to be applied on [record](../functions/record.md)
### Remarks
Since 0.0.12
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `T` | `unknown` |
### Properties
#### noNullPrototype? {#nonullprototype}
> `optional` **noNullPrototype?**: `boolean`
Defined in: [packages/fast-check/src/arbitrary/record.ts:29](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/record.ts#L29)
Do not generate records with null prototype
##### Default Value
```ts
false
```
##### Remarks
Since 3.13.0
***
#### requiredKeys? {#requiredkeys}
> `optional` **requiredKeys?**: `T`[]
Defined in: [packages/fast-check/src/arbitrary/record.ts:23](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/record.ts#L23)
List keys that should never be deleted.
Remark:
You might need to use an explicit typing in case you need to declare symbols as required (not needed when required keys are simple strings).
With something like `{ requiredKeys: [mySymbol1, 'a'] as [typeof mySymbol1, 'a'] }` when both `mySymbol1` and `a` are required.
##### Default Value
```ts
Array containing all keys of recordModel
```
##### Remarks
Since 2.11.0
---
## Type Alias: RecordValue\
> **RecordValue**\<`T`, `K`\> = `Prettify`\<`Partial`\<`T`\> & `Pick`\<`T`, `K` & keyof `T`\>\>
Defined in: [packages/fast-check/src/arbitrary/record.ts:39](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/record.ts#L39)
Infer the type of the Arbitrary produced by record
given the type of the source arbitrary and constraints to be applied
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
| `K` |
### Remarks
Since 2.2.0
---
## Type Alias: RunDetails\
> **RunDetails**\<`Ts`\> = [`RunDetailsFailureProperty`](../interfaces/RunDetailsFailureProperty.md)\<`Ts`\> \| [`RunDetailsFailureTooManySkips`](../interfaces/RunDetailsFailureTooManySkips.md)\<`Ts`\> \| [`RunDetailsFailureInterrupted`](../interfaces/RunDetailsFailureInterrupted.md)\<`Ts`\> \| [`RunDetailsSuccess`](../interfaces/RunDetailsSuccess.md)\<`Ts`\>
Defined in: [packages/fast-check/src/check/runner/reporter/RunDetails.ts:13](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/runner/reporter/RunDetails.ts#L13)
Post-run details produced by [check](../functions/check.md)
A failing property can easily detected by checking the `failed` flag of this structure
### Type Parameters
| Type Parameter |
| ------ |
| `Ts` |
### Remarks
Since 0.0.7
---
## Type Alias: SchedulerAct
> **SchedulerAct** = (`f`) => `Promise`\<`void`\>
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:16](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L16)
Function responsible to run the passed function and surround it with whatever needed.
The name has been inspired from the `act` function coming with React.
This wrapper function is not supposed to throw. The received function f will never throw.
Wrapping order in the following:
- global act defined on `fc.scheduler` wraps wait level one
- wait act defined on `s.waitX` wraps local one
- local act defined on `s.scheduleX(...)` wraps the trigger function
### Parameters
| Parameter | Type |
| ------ | ------ |
| `f` | () => `Promise`\<`void`\> |
### Returns
`Promise`\<`void`\>
### Remarks
Since 3.9.0
---
## Type Alias: SchedulerSequenceItem\
> **SchedulerSequenceItem**\<`TMetaData`\> = \{ `builder`: () => `Promise`\<`any`\>; `label`: `string`; `metadata?`: `TMetaData`; \} \| (() => `Promise`\<`any`\>)
Defined in: [packages/fast-check/src/arbitrary/\_internals/interfaces/Scheduler.ts:139](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/interfaces/Scheduler.ts#L139)
Define an item to be passed to `scheduleSequence`
### Type Parameters
| Type Parameter | Default type |
| ------ | ------ |
| `TMetaData` | `unknown` |
### Union Members
#### Type Literal
\{ `builder`: () => `Promise`\<`any`\>; `label`: `string`; `metadata?`: `TMetaData`; \}
##### builder
> **builder**: () => `Promise`\<`any`\>
Builder to start the task
###### Returns
`Promise`\<`any`\>
###### Remarks
Since 1.20.0
##### label
> **label**: `string`
Label
###### Remarks
Since 1.20.0
##### metadata?
> `optional` **metadata?**: `TMetaData`
Metadata to be attached into logs
###### Remarks
Since 1.25.0
***
#### Function
() => `Promise`\<`any`\>
### Remarks
Since 1.20.0
---
## Type Alias: SetConstraints
> **SetConstraints** = `object`
Defined in: [packages/fast-check/src/arbitrary/set.ts:12](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/set.ts#L12)
Constraints to be applied on [set](../functions/set.md)
### Remarks
Since 4.4.0
### Properties
#### depthIdentifier? {#depthidentifier}
> `optional` **depthIdentifier?**: [`DepthIdentifier`](DepthIdentifier.md) \| `string`
Defined in: [packages/fast-check/src/arbitrary/set.ts:43](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/set.ts#L43)
When receiving a depth identifier, the arbitrary will impact the depth
attached to it to avoid going too deep if it already generated lots of items.
In other words, if the number of generated values within the collection is large
then the generated items will tend to be less deep to avoid creating structures a lot
larger than expected.
For the moment, the depth is not taken into account to compute the number of items to
define for a precise generate call of the set. Just applied onto eligible items.
##### Remarks
Since 4.4.0
***
#### maxLength? {#maxlength}
> `optional` **maxLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/set.ts:24](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/set.ts#L24)
Upper bound of the generated set size
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 4.4.0
***
#### minLength? {#minlength}
> `optional` **minLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/set.ts:18](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/set.ts#L18)
Lower bound of the generated set size
##### Default Value
```ts
0
```
##### Remarks
Since 4.4.0
***
#### size? {#size}
> `optional` **size?**: [`SizeForArbitrary`](SizeForArbitrary.md)
Defined in: [packages/fast-check/src/arbitrary/set.ts:29](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/set.ts#L29)
Define how large the generated values should be (at max)
##### Remarks
Since 4.4.0
---
## Type Alias: Size
> **Size** = `"xsmall"` \| `"small"` \| `"medium"` \| `"large"` \| `"xlarge"`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/MaxLengthFromMinLength.ts:29](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/MaxLengthFromMinLength.ts#L29)
The size parameter defines how large the generated values could be.
The default in fast-check is 'small' but it could be increased (resp. decreased)
to ask arbitraries for larger (resp. smaller) values.
### Remarks
Since 2.22.0
---
## Type Alias: SizeForArbitrary
> **SizeForArbitrary** = `RelativeSize` \| [`Size`](Size.md) \| `"max"` \| `undefined`
Defined in: [packages/fast-check/src/arbitrary/\_internals/helpers/MaxLengthFromMinLength.ts:48](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/_internals/helpers/MaxLengthFromMinLength.ts#L48)
Superset of [Size](Size.md) to override the default defined for size
### Remarks
Since 2.22.0
---
## Type Alias: StringConstraints
> **StringConstraints** = [`StringSharedConstraints`](../interfaces/StringSharedConstraints.md) & `object`
Defined in: [packages/fast-check/src/arbitrary/string.ts:15](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/string.ts#L15)
Constraints to be applied on arbitrary [string](../functions/string.md)
### Type Declaration
#### unit?
> `optional` **unit?**: `"grapheme"` \| `"grapheme-composite"` \| `"grapheme-ascii"` \| `"binary"` \| `"binary-ascii"` \| [`Arbitrary`](../classes/Arbitrary.md)\<`string`\>
A string results from the join between several unitary strings produced by the Arbitrary instance defined by `unit`.
The `minLength` and `maxLength` refers to the number of these units composing the string. In other words it does not have to be confound with `.length` on an instance of string.
A unit can either be a fully custom Arbitrary or one of the pre-defined options:
- `'grapheme'` - Any printable grapheme as defined by the Unicode standard. This unit includes graphemes that may:
- Span multiple code points (e.g., `'\u{0061}\u{0300}'`)
- Consist of multiple characters (e.g., `'\u{1f431}'`)
- Include non-European and non-ASCII characters.
- **Note:** Graphemes produced by this unit are designed to remain visually distinct when joined together.
- **Note:** We are relying on the specifications of Unicode 15.
- `'grapheme-composite'` - Any printable grapheme limited to a single code point. This option produces graphemes limited to a single code point.
- **Note:** Graphemes produced by this unit are designed to remain visually distinct when joined together.
- **Note:** We are relying on the specifications of Unicode 15.
- `'grapheme-ascii'` - Any printable ASCII character.
- `'binary'` - Any possible code point (except half surrogate pairs), regardless of how it may combine with subsequent code points in the produced string. This unit produces a single code point within the full Unicode range (0000-10FFFF).
- `'binary-ascii'` - Any possible ASCII character, including control characters. This unit produces any code point in the range 0000-00FF.
##### Default Value
```ts
'grapheme-ascii'
```
##### Remarks
Since 3.22.0
### Remarks
Since 3.22.0
---
## Type Alias: StringMatchingConstraints
> **StringMatchingConstraints** = `object`
Defined in: [packages/fast-check/src/arbitrary/stringMatching.ts:34](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/stringMatching.ts#L34)
Constraints to be applied on the arbitrary [stringMatching](../functions/stringMatching.md)
### Remarks
Since 3.10.0
### Properties
#### maxLength? {#maxlength}
> `optional` **maxLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/stringMatching.ts:40](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/stringMatching.ts#L40)
Upper bound of the generated string length (included)
##### Default Value
```ts
0x7fffffff
```
##### Remarks
Since 4.6.0
***
#### size? {#size}
> `optional` **size?**: [`SizeForArbitrary`](SizeForArbitrary.md)
Defined in: [packages/fast-check/src/arbitrary/stringMatching.ts:45](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/stringMatching.ts#L45)
Define how large the generated values should be (at max)
##### Remarks
Since 3.10.0
---
## Type Alias: UniqueArrayConstraints\
> **UniqueArrayConstraints**\<`T`, `U`\> = [`UniqueArrayConstraintsRecommended`](UniqueArrayConstraintsRecommended.md)\<`T`, `U`\> \| [`UniqueArrayConstraintsCustomCompare`](UniqueArrayConstraintsCustomCompare.md)\<`T`\> \| [`UniqueArrayConstraintsCustomCompareSelect`](UniqueArrayConstraintsCustomCompareSelect.md)\<`T`, `U`\>
Defined in: [packages/fast-check/src/arbitrary/uniqueArray.ts:165](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uniqueArray.ts#L165)
Constraints implying known and optimized comparison function
to be applied on [uniqueArray](../functions/uniqueArray.md)
The defaults relies on the defaults specified by [UniqueArrayConstraintsRecommended](UniqueArrayConstraintsRecommended.md)
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
| `U` |
### Remarks
Since 2.23.0
---
## Type Alias: UniqueArrayConstraintsCustomCompare\
> **UniqueArrayConstraintsCustomCompare**\<`T`\> = [`UniqueArraySharedConstraints`](UniqueArraySharedConstraints.md) & `object`
Defined in: [packages/fast-check/src/arbitrary/uniqueArray.ts:121](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uniqueArray.ts#L121)
Constraints implying a fully custom comparison function
to be applied on [uniqueArray](../functions/uniqueArray.md)
WARNING - Imply an extra performance cost whenever you want to generate large arrays
### Type Declaration
#### comparator
> **comparator**: (`a`, `b`) => `boolean`
The operator to be used to compare the values after having applied the selector (if any)
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `a` | `T` |
| `b` | `T` |
##### Returns
`boolean`
##### Remarks
Since 2.23.0
#### selector?
> `optional` **selector?**: `undefined`
How we should project the values before comparing them together
##### Remarks
Since 2.23.0
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
### Remarks
Since 2.23.0
---
## Type Alias: UniqueArrayConstraintsCustomCompareSelect\
> **UniqueArrayConstraintsCustomCompareSelect**\<`T`, `U`\> = [`UniqueArraySharedConstraints`](UniqueArraySharedConstraints.md) & `object`
Defined in: [packages/fast-check/src/arbitrary/uniqueArray.ts:143](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uniqueArray.ts#L143)
Constraints implying fully custom comparison function and selector
to be applied on [uniqueArray](../functions/uniqueArray.md)
WARNING - Imply an extra performance cost whenever you want to generate large arrays
### Type Declaration
#### comparator
> **comparator**: (`a`, `b`) => `boolean`
The operator to be used to compare the values after having applied the selector (if any)
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `a` | `U` |
| `b` | `U` |
##### Returns
`boolean`
##### Remarks
Since 2.23.0
#### selector
> **selector**: (`v`) => `U`
How we should project the values before comparing them together
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `v` | `T` |
##### Returns
`U`
##### Remarks
Since 2.23.0
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
| `U` |
### Remarks
Since 2.23.0
---
## Type Alias: UniqueArrayConstraintsRecommended\
> **UniqueArrayConstraintsRecommended**\<`T`, `U`\> = [`UniqueArraySharedConstraints`](UniqueArraySharedConstraints.md) & `object`
Defined in: [packages/fast-check/src/arbitrary/uniqueArray.ts:92](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uniqueArray.ts#L92)
Constraints implying known and optimized comparison function
to be applied on [uniqueArray](../functions/uniqueArray.md)
### Type Declaration
#### comparator?
> `optional` **comparator?**: `"SameValue"` \| `"SameValueZero"` \| `"IsStrictlyEqual"`
The operator to be used to compare the values after having applied the selector (if any):
- SameValue behaves like `Object.is` — [https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevalue](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevalue)
- SameValueZero behaves like `Set` or `Map` — [https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-samevaluezero)
- IsStrictlyEqual behaves like `===` — [https://tc39.es/ecma262/multipage/abstract-operations.html#sec-isstrictlyequal](https://tc39.es/ecma262/multipage/abstract-operations.html#sec-isstrictlyequal)
- Fully custom comparison function: it implies performance costs for large arrays
##### Default Value
```ts
'SameValue'
```
##### Remarks
Since 2.23.0
#### selector?
> `optional` **selector?**: (`v`) => `U`
How we should project the values before comparing them together
##### Parameters
| Parameter | Type |
| ------ | ------ |
| `v` | `T` |
##### Returns
`U`
##### Default Value
```ts
(v => v)
```
##### Remarks
Since 2.23.0
### Type Parameters
| Type Parameter |
| ------ |
| `T` |
| `U` |
### Remarks
Since 2.23.0
---
## Type Alias: UniqueArraySharedConstraints
> **UniqueArraySharedConstraints** = `object`
Defined in: [packages/fast-check/src/arbitrary/uniqueArray.ts:51](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uniqueArray.ts#L51)
Shared constraints to be applied on [uniqueArray](../functions/uniqueArray.md)
### Remarks
Since 2.23.0
### Properties
#### depthIdentifier? {#depthidentifier}
> `optional` **depthIdentifier?**: [`DepthIdentifier`](DepthIdentifier.md) \| `string`
Defined in: [packages/fast-check/src/arbitrary/uniqueArray.ts:82](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uniqueArray.ts#L82)
When receiving a depth identifier, the arbitrary will impact the depth
attached to it to avoid going too deep if it already generated lots of items.
In other words, if the number of generated values within the collection is large
then the generated items will tend to be less deep to avoid creating structures a lot
larger than expected.
For the moment, the depth is not taken into account to compute the number of items to
define for a precise generate call of the array. Just applied onto eligible items.
##### Remarks
Since 2.25.0
***
#### maxLength? {#maxlength}
> `optional` **maxLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/uniqueArray.ts:63](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uniqueArray.ts#L63)
Upper bound of the generated array size
##### Default Value
0x7fffffff — _defaulting seen as "max non specified" when `defaultSizeToMaxWhenMaxSpecified=true`_
##### Remarks
Since 2.23.0
***
#### minLength? {#minlength}
> `optional` **minLength?**: `number`
Defined in: [packages/fast-check/src/arbitrary/uniqueArray.ts:57](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uniqueArray.ts#L57)
Lower bound of the generated array size
##### Default Value
```ts
0
```
##### Remarks
Since 2.23.0
***
#### size? {#size}
> `optional` **size?**: [`SizeForArbitrary`](SizeForArbitrary.md)
Defined in: [packages/fast-check/src/arbitrary/uniqueArray.ts:68](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/arbitrary/uniqueArray.ts#L68)
Define how large the generated values should be (at max)
##### Remarks
Since 2.23.0
---
## Type Alias: WithAsyncToStringMethod
> **WithAsyncToStringMethod** = `object`
Defined in: [packages/fast-check/src/utils/stringify.ts:74](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/utils/stringify.ts#L74)
Interface to implement for [asyncToStringMethod](../variables/asyncToStringMethod.md)
### Remarks
Since 2.17.0
### Properties
#### \[asyncToStringMethod\] {#asynctostringmethod}
> **\[asyncToStringMethod\]**: () => `Promise`\<`string`\>
Defined in: [packages/fast-check/src/utils/stringify.ts:74](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/utils/stringify.ts#L74)
##### Returns
`Promise`\<`string`\>
---
## Type Alias: WithToStringMethod
> **WithToStringMethod** = `object`
Defined in: [packages/fast-check/src/utils/stringify.ts:40](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/utils/stringify.ts#L40)
Interface to implement for [toStringMethod](../variables/toStringMethod.md)
### Remarks
Since 2.17.0
### Properties
#### \[toStringMethod\] {#tostringmethod}
> **\[toStringMethod\]**: () => `string`
Defined in: [packages/fast-check/src/utils/stringify.ts:40](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/utils/stringify.ts#L40)
##### Returns
`string`
---
## Variable: asyncToStringMethod
> `const` **asyncToStringMethod**: unique `symbol`
Defined in: [packages/fast-check/src/utils/stringify.ts:67](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/utils/stringify.ts#L67)
Use this symbol to define a custom serializer for your instances.
Serializer must be a function returning a promise of string (see [WithAsyncToStringMethod](../type-aliases/WithAsyncToStringMethod.md)).
Please note that:
1. It will only be useful for asynchronous properties.
2. It has to return barely instantly.
### Remarks
Since 2.17.0
---
## Variable: cloneMethod
> `const` **cloneMethod**: unique `symbol`
Defined in: [packages/fast-check/src/check/symbols.ts:14](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/check/symbols.ts#L14)
Generated instances having a method [cloneMethod]
will be automatically cloned whenever necessary
This is pretty useful for statefull generated values.
For instance, whenever you use a Stream you directly impact it.
Implementing [cloneMethod] on the generated Stream would force
the framework to clone it whenever it has to re-use it
(mainly required for chrinking process)
### Remarks
Since 1.8.0
---
## Variable: \_\_commitHash
> `const` **\_\_commitHash**: `string`
Defined in: [packages/fast-check/src/fast-check-default.ts:236](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/fast-check-default.ts#L236)
Commit hash of the current code (eg.: process.env.__COMMIT_HASH__)
### Remarks
Since 2.7.0
---
## Variable: toStringMethod
> `const` **toStringMethod**: unique `symbol`
Defined in: [packages/fast-check/src/utils/stringify.ts:33](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/utils/stringify.ts#L33)
Use this symbol to define a custom serializer for your instances.
Serializer must be a function returning a string (see [WithToStringMethod](../type-aliases/WithToStringMethod.md)).
### Remarks
Since 2.17.0
---
## Variable: \_\_type
> `const` **\_\_type**: `string`
Defined in: [packages/fast-check/src/fast-check-default.ts:224](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/fast-check-default.ts#L224)
Type of module (commonjs or module)
### Remarks
Since 1.22.0
---
## Variable: \_\_version
> `const` **\_\_version**: `string`
Defined in: [packages/fast-check/src/fast-check-default.ts:230](https://github.com/dubzzz/fast-check/blob/beddedcd5553c134a3f08cab5583f81a22c42215/packages/fast-check/src/fast-check-default.ts#L230)
Version of fast-check used by your project (eg.: process.env.__PACKAGE_VERSION__)
### Remarks
Since 1.22.0
---
## Custom reports
Customize how to report failures.
### Default Report
When failing `assert` automatically format the errors for you, with something like:
```txt
**FAIL** sort.test.mjs > should sort numeric elements from the smallest to the largest one
Error: Property failed after 1 tests
{ seed: -1819918769, path: "0:...:3", endOnFailure: true }
Counterexample: [[2,1000000000]]
Shrunk 66 time(s)
Got error: AssertionError: expected 1000000000 to be less than or equal to 2
```
While easily redeable, you may want to format it differently. Explaining how you can do that is the aim of this page.
:::info[How to read such reports?]
If you want to know more concerning how to read such reports, you may refer to the [Read Test Reports](/docs/tutorials/quick-start/read-test-reports/) section of our [Quick Start](/docs/tutorials/quick-start/basic-setup/) tutorial.
:::
### Verbosity
The simplest and built-in way to change how to format the errors in a different way is verbosity. Verbosity can be either 0, 1 or 2 and is defaulted to 1. It can be changed at `assert`'s level, by passing the option `verbose: ` to it.
You may refer to [Read Test Reports](/docs/tutorials/quick-start/read-test-reports/#how-to-increase-verbosity) for more details on it.
### New Reporter
In some cases you might be interested into fully customizing, extending or even changing how a failure should be formated. You can define your own reporting strategy by declaring a plugin relying on the `onAllRunsComplete` hook and passing it to `assert` as follow:
```javascript
const reporterPlugin = () => ({
onAllRunsComplete: out => {
// Let's say we want to re-create the default reporter of `assert`
if (out.failed) {
// Throwing from `onAllRunsComplete` overrides the default report of `assert`
// `defaultReportMessage` is an utility that make you able to have the exact
// same report as the one that would have been generated by `assert`
throw new Error(fc.defaultReportMessage(out));
}
},
});
fc.assert(
// You can either use it with `fc.property`
// or `fc.asyncProperty`
fc.property(...),
{ plugins: [reporterPlugin] },
)
```
:::info[Deprecated `reporter` and `asyncReporter`]
Before the introduction of plugins, custom reporting used to be achieved by passing a custom `reporter` to `assert`:
```js
fc.assert(fc.property(...), {
reporter(out) {
if (out.failed) {
throw new Error(fc.defaultReportMessage(out));
}
},
});
```
In case of a reporter relying on asynchronous code, `asyncReporter` had to be used instead of `reporter`. Contrary to `reporter` that was used for both synchronous and asynchronous properties, `asyncReporter` was forbidden for synchronous properties and made them throw.
Both `reporter` and `asyncReporter` are now deprecated: prefer a plugin relying on the `onAllRunsComplete` hook.
:::
:::info[Before `reporter` and `asyncReporter`]
In the past, writing your own reporter would have been done as follow:
```js
const throwIfFailed = (out) => {
if (out.failed) {
throw new Error(fc.defaultReportMessage(out));
}
};
const myCustomAssert = (property, parameters) => {
const out = fc.check(property, parameters);
if (property.isAsync()) {
return out.then((runDetails) => {
throwIfFailed(runDetails);
});
}
throwIfFailed(out);
};
```
This approach based on `fc.check` stays fully supported and remains the way to go whenever the default report of `assert` has to be dropped entirely, including its "throw on failure" behavior.
:::
### CodeSandbox Reporter
In some situations, it can be useful to directly publish a minimal reproduction of an issue in order to be able to play with it. Reporter plugins can be used to provide such capabilities.
For instance, you can automatically generate CodeSandbox environments in case of failed property with the snippet below:
```js
import { getParameters } from 'codesandbox/lib/api/define';
const buildCodeSandboxReporterPlugin = (createFiles) => {
return () => ({
onAllRunsComplete(runDetails) {
if (!runDetails.failed) {
return;
}
const counterexample = runDetails.counterexample;
const originalErrorMessage = fc.defaultReportMessage(runDetails);
if (counterexample === undefined) {
throw new Error(originalErrorMessage);
}
const files = {
...createFiles(counterexample),
'counterexample.js': {
content: `export const counterexample = ${fc.stringify(counterexample)}`
},
'report.txt': {
content: originalErrorMessage
}
}
const url = `https://codesandbox.io/api/v1/sandboxes/define?parameters=${getParameters({ files })}`;
throw new Error(`${originalErrorMessage}\n\nPlay with the failure here: ${url}`);
},
});
}
fc.assert(
fc.property(...),
{
plugins: [
buildCodeSandboxReporterPlugin(counterexample => ({
'index.js': {
content: 'console.log("Code to reproduce the issue")'
}
}))
]
}
)
```
:::info[CodeSandbox documentation]
The official documentation explaining how to build CodeSandbox environments from an url is available here: https://codesandbox.io/docs/importing#get-request.
:::
### Customize toString
By default, fast-check serializes generated values using its internal `stringify` helper. Sometimes you may want a better stringified representation of your instances. In such cases, you have several solutions:
1. If your instance defines a `toString` method, it will used to properly report it, unless you've defined one of the following methods, which take precedence.
2. If defining `toString` method is to intrusive, you can use `toStringMethod` and `asyncToStringMethod`.
In most cases, `toStringMethod` is sufficient. This is the serializer method that fast-check uses to serialize your instance in any context: synchronous or asynchronous.
```ts
Object.defineProperties(myInstanceWithoutCustomToString, {
[fc.toStringMethod]: { value: () => 'my-value' },
});
// here your instance defines a custom serializer
// that will be used by fast-check whenever needed
```
However, if you're working with asynchronous values, you may need an async method to retrieve the value. For example:
```ts
Object.defineProperties(myPromisePossiblyResolved, {
[fc.asyncToStringMethod]: {
value: async () => {
const resolved = await myPromisePossiblyResolved;
return `My value: ${resolved}`;
},
},
});
```
:::info[Limitations of async variant]
Note that:
- `asyncToStringMethod` is only used for asynchronous properties.
- Although `asyncToStringMethod` is marked as asynchronous, it should resolve almost instantly.
:::
:::tip[Test your custom `toString`]
One way to ensure that your instances will be properly stringified is to call the `stringify` function provided by fast-check. This will give you a preview of how your instances will be represented in the output.
:::
---
## Global settings
Share settings cross runners.
### Per test settings
By default, the [runners](/docs/core-blocks/runners/) take an [optional argument for extra settings](/docs/api/interfaces/Parameters). Some of these settings can be re-used over-and-over in the same file and across several files.
Example:
```js
test('test #1', () => {
fc.assert(myProp1, { numRuns: 10 });
});
test('test #2', () => {
fc.assert(myProp2, { numRuns: 10 });
});
test('test #3', () => {
fc.assert(myProp3, { numRuns: 10 });
});
```
### Shared settings
The recommended way to share settings across runners is to use `configureGlobal`.
Here is how to update the snippet above to share the settings:
```js
fc.configureGlobal({ numRuns: 10 });
test('test #1', () => {
fc.assert(myProp1);
});
test('test #2', () => {
fc.assert(myProp2);
});
test('test #3', () => {
fc.assert(myProp3);
});
```
:::warning
`configureGlobal` fully resets the settings. In other words, it fully drops the previously defined global settings if any even if they applied on other keys.
:::
:::tip[Enrich existing global settings]
If you want to only add new options on top of the existing ones you may want to use `readConfigureGlobal` as follow:
```js
fc.configureGlobal({ ...fc.readConfigureGlobal(), ...myNewOptions });
```
You can also fully reset all the global options by calling `resetConfigureGlobal`.
:::
:::info[Plugins]
[Plugins](/docs/core-blocks/plugins/) cannot be shared via `configureGlobal`, they have their own installer: `fc.installGlobalPlugin(myPlugin())`.
:::
:::warning[Deprecated hooks]
The `beforeEach`, `afterEach`, `asyncBeforeEach` and `asyncAfterEach` settings have been deprecated in favor of their plugin equivalents. They can be set up via `fc.installGlobalPlugin(fc.beforeEach(fn))`, see [life-cycle plugins](/docs/core-blocks/plugins/life-cycle/).
:::
Resources: [API reference](/docs/api/functions/configureGlobal).
Available since 1.18.0.
### Integration with test frameworks
Main test frameworks provide ways to connect `configureGlobal` on all the spec files without having to copy the snippet over-and-over. This section describes how to do so with some of them.
#### Jest
You need to define a setup file (if not already done):
```js title="jest.config.js"
module.exports = {
setupFiles: ['./jest.setup.js'],
};
```
Then you can add the global settings snippet directly into the setup file:
```js title="jest.setup.js"
const fc = require('fast-check');
fc.configureGlobal({ numRuns: 10 });
```
#### Mocha
When calling mocha, you can provide an additional parameter to specify a file to be executed before the code of your tests by adding `--file=mocha.setup.js`.
Then you can add the global settings snippet directly into the setup file:
```js title="mocha.setup.js"
const fc = require('fast-check');
fc.configureGlobal({ numRuns: 10 });
```
#### Vitest
You need to define a setup file (if not already done):
```ts title="vitest.config.js"
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
// ...
setupFiles: ['./vitest.setup.js'],
},
});
```
Then you can add the global settings snippet directly into the setup file:
```js title="vitest.setup.js"
import fc from 'fast-check';
fc.configureGlobal({ numRuns: 10 });
```
---
## Configuration
fast-check works out of the box, but everything it does is configurable: the number of runs per property, the seed that makes a failure reproducible, how large generated values can grow, how long a run can take and how results are reported.
There are two levels at which you can set any of these knobs and knowing how they interact is the single most useful thing on this page:
- **Per assertion** — pass a `Parameters` object as the second argument to `fc.assert(property, { ... })`. This wins over everything else and applies only to that one call.
- **Globally** — call [`fc.configureGlobal({ ... })`](/docs/configuration/global-settings/) once, typically in a test setup file, to apply defaults to every assertion in the process.
The per-assertion form always overrides the global one, so a common pattern is to pin conservative defaults globally (e.g. tighter timeouts in CI) and widen them locally for the few tests that need more runs, larger input or a specific seed.
```mdx-code-block
import DocCardList from '@theme/DocCardList';
```
---
## Larger entries by default
Customize the default "good enough" size for your tests.
### What's the best length?
Have you ever thought about what is a good random string? What we usually call strings range from a few characters to thousands or even more characters. When using fast-check to generate random strings, arrays, objects, etc., the question of what constitutes a good length has to be addressed.
There were multiple ways to handle that case:
- Explicit: Require users to specify the maximum length whenever a structure with length is generated.
- Implicit: Never require users to specify the maximum length and instead fallback to a default maximum length when none is provided.
- A combination of the two...
However, the requested maximum length may not be a true constraint of the algorithm itself, but rather a suitable length for testing. By asking users to specify this maximum length, we are somehow asking them to configure an internal aspect of the framework.
To overcome this limitation, we introduced the concept of "size", which is not directly tied to the maximum length. While the maximum length serves as an upper boundary for the algorithm, the size parameter represents an upper boundary for testing purposes.
### Size explained
Since version 2.22.0, there is a distinction between constraints required by specifications and what will really be generated. When dealing with array-like arbitraries such as `fc.array` or `fc.string`, defining a constraint like `maxLength` can be seen as if you wrote "my algorithm is not supposed to handle arrays having more than X elements". It does not ask fast-check to generate arrays with X elements, but tells it that it could if needed or asked to.
What really drives fast-check into generating large arrays is called `size`. At the level of an arbitrary it can be set to:
- Relative size: `"-4"`, `"-3"`, `"-2"`, `"-1"`, `"="`, `"+1"`, `"+2"`, `"+3"` or `"+4"` — _offset the global setting `baseSize` by the passed offset_
- Explicit size: `"xsmall"`, `"small"`, `"medium"`, `"large"` or `"xlarge"` — _use an explicit size_
- Exact value: `"max"` — _generate entities having up-to `maxLength` items_
- Automatic size: `undefined` — _if `maxLength` has not been specified or if the global setting `defaultSizeToMaxWhenMaxSpecified` is `false` then `"="`, otherwise `"max"`_
Here is a quick overview of how we use the `size` parameter associated to a minimal length to compute the maximal length for the generated values:
- `xsmall` — `min + (0.1 * min + 1)`
- `small` (default) — `min + (1 * min + 10)`
- `medium` — `min + (10 * min + 100)`
- `large` — `min + (100 * min + 1000)`
- `xlarge` — `min + (1000 * min + 10000)`
### Depth size explained
Since version 2.25.0, there is a tied link between [size](/docs/configuration/larger-entries-by-default/#size-explained) and depth of recursive structures.
`depthFactor` (aka `depthSize` since 3.0.0) has been introduced in version 2.14.0 as a numeric floating point value between `0`
and `+infinity`. It was used to reduce the risk of generating infinite structures when relying on recursive arbitraries.
Then size came in 2.22.0 and with it an idea: make it simple for users to configure complex things. While depth factor
was pretty cool, selecting the right value was not trivial from a user point of view. So size has been leveraged for both:
number of items defined within an iterable structure and depth. Except very complex and ad-hoc cases, we expect size to
be the only kind of configuration used to setup depth factors.
So starting in 3.0.0, we relabelled `depthFactor` as `depthSize`. It works exactly the same way as size, it can rely on Relative Size but also Explicit Size. As for length, if not specified the size will either be defaulted to `"="` or to `"max"` depending on the flag `defaultSizeToMaxWhenMaxSpecified` and on the fact that the user specified a maximal depth or not. The only case defaulting to `"max"` is: user specified a maximal depth onto the instance but not size and `defaultSizeToMaxWhenMaxSpecified` is set to `true`. Any other setup will fallback to `"="`.
Here is how a size translates into manually defined `depthSize`:
- `xsmall` — `1`
- `small` (default) — `2`
- `medium` — `4`
- `large` — `8`
- `xlarge` — `16`
In the context of fast-check@v2, the condition to leverage an automatic defaulting of the depth factor is to:
- either define it to `=` for each arbitrary not defaulting it automatically (only `option` and `oneof` do not default it to avoid breaking existing code)
- or to configure a `baseSize` in the global settings
In the context of fast-check@v2, `depthFactor` is the same as `depthSize` except for numeric values. For those values `depthSize = 1 / depthFactor`.
If none of these conditions is fulfilled the depth factor will be defaulted to `0` as it was the case before we introduced it.
Otherwise, depth factor will be defaulted automatically for you.
### Override the default size
By default, all arbitraries have their size set to `baseSize`, which is set to `"small"` by default. This means that when generating array-like entities, the number of items in them will be relatively small. Specifically, when using `fc.array(fc.nat())`, the resulting arrays will have between 0 and 10 elements.
There are two main ways to adjust this upper bound:
- At instantiation level by passing an explicit size, as in `fc.array(fc.nat(), {size: '+1'})`
- At global level
At global level, there are two main options:
- `baseSize`, which defaults to `"small"`, sets the default size when no size is specified at the instantiation level.
- `defaultSizeToMaxWhenMaxSpecified` determines how to handle cases where an arbitrary has an upper bound (e.g., `maxLength` or `maxDepth`) but no size is specified. When `true`, the size defaults to the maximum value; when `false`, the size defaults to `baseSize` if not defined.
Here's a brief example that demonstrates how to customize both the global and instantiation levels:
```js
// Override the global size to medium.
fc.configureGlobal({ baseSize: 'medium' });
// Override the local size of the second string only.
// Size 'medium' will be used by a and c, while b will be 'large' (=medium+1).
test('should always contain its substrings', () => {
fc.assert(
fc.property(fc.string(), fc.string({ size: '+1' }), fc.string(), (a, b, c) => {
expect(contains(a + b + c, b)).toBe(true);
}),
);
});
```
:::info
To learn how to customize the size for a particular arbitrary, please refer to the [documentation](/docs/core-blocks/arbitraries/primitives/number/) provided for that arbitrary.
:::
---
## Timeouts
Learn about the various timeout options available in the fast-check.
### How and where to stop?
When dealing with timeouts in property-based testing, there are several levels and options to consider. Timeouts can be applied to the entire test suite, limiting the total execution time of all tests. Alternatively, timeouts can be set for individual predicate executions, allowing for finer-grained control over the test time. Additionally, timeouts can be used to prevent excessively long test runs or to report on runs that have taken too long.
Let's dig into the multiple timeout options provided by fast-check.
### At predicate level
#### timeout
You can use the `timeout` option with the `assert` function in fast-check to limit the amount of time allocated to run each instance of the predicate defined by your property. If the predicate takes longer than the specified time, the execution will be reported as a failure. fast-check will then attempt to shrink the inputs so that you can more easily identify the cause of the timeout.
:::warning[Need asynchronous properties]
It's important to note that the `timeout` option only works with asynchronous properties as it needs a way to interrupt another running script. If you want to use it with synchronous code, you can check out the `@fast-check/worker` package.
:::
Let's explore how the `timeout` option works by looking at the following code snippet:
```ts
await fc.assert(
fc.asyncProperty(packagesArb, fc.nat(), async (packages, selectedSeed) => {
// Arrange
const allPackagesNames = Array.from(packages.keys());
const selectedPackage = allPackagesNames[allPackagesNames.length % selectedSeed];
// Act
const registry = new FakeRegistry(packages);
const dependencies = await extractAllDependenciesFor(selectedPackage, registry);
// Assert
for (const dependency of dependencies) {
expect(allPackagesNames).toContain(dependency.name);
}
}),
{ timeout: 1000 },
);
```
In the provided example, the `timeout` will only be triggered if one execution of `async (packages, selectedSeed) => {...}` takes more than 1 second. It's also important to highlight the fact that the timeout option can only intervene for asynchronous tasks taking too long. In other words, in the predicate above, only the code executed asynchronously during the execution of `extractAllDependenciesFor` could be bypassed and raise a timeout issue.
:::info[Cannot stop the async code]
It's important to note that fast-check cannot stop the execution of a running `Promise` as there is no way to cancel it in JavaScript. As a result, if a run takes too long to execute and exceeds the specified timeout limit, fast-check will simply ignore the follow-up results. This means that the code will continue to run until it completes, even if fast-check reported a timeout failure.
If you want to stop asynchronous code abruptly when it takes too long, you can check out the `@fast-check/worker` package. It provides a way to run code in a separate worker thread and stop the worker thread if it takes too long, effectively interrupting the execution of the code.
:::
In case of failure linked to a timeout, the report might look like:
```txt
Uncaught Error: Property failed after 1 tests
{ seed: 1234070620, path: "0:0", endOnFailure: true }
Counterexample: [new Map([["my-package",{}]]),0]
Shrunk 1 time(s)
Got Property timeout: exceeded limit of 1000 milliseconds
Hint: Enable verbose mode in order to have the list of all failing values encountered during the run
at buildError (/workspaces/fast-check/packages/fast-check/lib/check/runner/utils/RunDetailsFormatter.js:131:15)
at asyncThrowIfFailed (/workspaces/fast-check/packages/fast-check/lib/check/runner/utils/RunDetailsFormatter.js:148:11)
at runNextTicks (node:internal/process/task_queues:60:5)
at process.processTimers (node:internal/timers:509:9)
```
:::info[Interaction with `beforeEach` and `afterEach`]
Note that the function provided to `beforeEach` and `afterEach` are not included in the measured time for the timeout. If the execution is interrupted due to a timeout, `afterEach` will be called immediately without waiting for the predicate to finish.
:::
Resources: [API reference](/docs/api/interfaces/Parameters#timeout).
Available since 0.0.11.
### At runner level
#### interruptAfterTimeLimit
The `interruptAfterTimeLimit` option can be used to customize the maximum amount of time that the runner is allowed to execute a property. It works on both synchronous and asynchronous properties.
By default, interrupting a runner after the deadline is not considered an error unless no predicate succeeded. However, this behavior can be overridden by setting `markInterruptAsFailure: true` in which case any interruption of the execution will be considered a failure.
Here is a summary:
| Interrupted... | Resulting status with `markInterruptAsFailure: false` | Resulting status with `markInterruptAsFailure: true` |
| ------------------------- | ----------------------------------------------------- | ---------------------------------------------------- |
| without any success | Failure | Failure |
| with at least one success | Success | Failure |
| during shrink phase | Failure (shrink only happens on failures) | Failure |
:::tip[Companion for Fuzzing]
`interruptAfterTimeLimit` is particularly useful for fuzzing. For instance, setting it to `interruptAfterTimeLimit: 600_000` and adding `numRuns: Number.POSITIVE_INFINITY` would allow the runner to loop for 10 minutes, regardless of the number of predicates executed during that time.
:::
Resources: [API reference](/docs/api/interfaces/Parameters#interruptaftertimelimit).
Available since 1.19.0.
#### skipAllAfterTimeLimit
Interrupting the execution of predicates is one way to handle deadlines, but another option is skipping. `skipAllAfterTimeLimit` allows skipping the execution of predicates after the deadline has been reached.
Skipping predicates while there were no reported failures will result in a failure:
```txt
Failed to run property, too many pre-condition failures encountered
{ seed: 1119647454 }
Ran 0 time(s)
Skipped 10001 time(s)
Hint (1): Try to reduce the number of rejected values by combining map, chain and built-in arbitraries
Hint (2): Increase failure tolerance by setting maxSkipsPerRun to an higher value
Hint (3): Enable verbose mode at level VeryVerbose in order to check all generated values and their associated status
at buildError (/workspaces/fast-check/packages/fast-check/lib/check/runner/utils/RunDetailsFormatter.js:131:15)
at asyncThrowIfFailed (/workspaces/fast-check/packages/fast-check/lib/check/runner/utils/RunDetailsFormatter.js:148:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
```
During the shrinking process, skipping predicates will result in one-by-one skipping of all the executions required by the shrinker.
:::info[Interrupting is more efficient]
When we skip a predicate due to the `skipAllAfterTimeLimit` option, we still pass on it, which may take time. This is because each subsequent run needs to be marked as "will not be executed" one by one. On the other hand, with the `interruptAfterTimeLimit` option, the runner is stopped immediately when the deadline is reached, resulting in a faster stop.
:::
Resources: [API reference](/docs/api/interfaces/Parameters#timeout).
Available since 1.15.0.
### All timeout options
| Option | Level | Property kind | `beforeEach`/`afterEach` included in the measured time | Mark run as failed |
| ------------------------- | --------- | -------------- | ------------------------------------------------------ | ---------------------------------------------------------- |
| `timeout` | predicate | async | no | yes |
| `interruptAfterTimeLimit` | runner | sync and async | yes | no except when first run or `markInterruptAsFailure:true` |
| `skipAllAfterTimeLimit` | runner | sync and async | yes | no except when timeout occured outside of the shrink phase |
:::info[Always run `beforeEach` and `afterEach`]
`beforeEach` and `afterEach` functions will always be executed, regardless of whether they are included in the measured time for the timeout or not
:::
---
## User definable values
Snapshot errors previously encountered and ask for help to reduce cases.
### Run against custom values
Although property-based testing generates values automatically, you may still want to manually define specific examples that you want to test. This could be useful for a variety of reasons, such as testing values that have previously caused your code to fail or confirming that your code succeeds on certain examples.
The `assert` function allows you to set a custom list of examples in its settings. They will be executed before the other values generated by the framework. It is important to note that this does not affect the total number of values tested against your property: if you add 5 custom examples, then 5 generated values will be removed from the run.
The syntax is the following:
```ts
// For a one parameter property
fc.assert(fc.property(fc.nat(), myCheckFunction), {
examples: [
[0], // first example I want to test
[Number.MAX_SAFE_INTEGER],
],
});
// For a multiple parameters property
fc.assert(fc.property(fc.string(), fc.string(), fc.string(), myCheckFunction), {
examples: [
// Manual case 1
[
'replace value coming from 1st fc.string',
'replace value coming from 2nd fc.string',
'replace value coming from 3rd fc.string',
],
],
});
```
:::tip[Usage with `context`]
If you are using `context` to log within a predicate, you will need to use the following context implementation in your examples.
```ts
const exampleContext = () => fc.sample(fc.context(), { numRuns: 1 })[0];
fc.assert(fc.property(fc.string(), fc.string(), fc.context(), myCheckFunction), {
examples: [['', '', exampleContext()]],
});
```
:::
:::info[Trust the framework]
Please keep in mind that property based testing frameworks are fully able to find corner-cases with no help at all.
:::
### Shrink custom values
Not only, you can ask fast-check to run your predicate against manually defined values but you can also ask it for help.
Sometimes, you may discover a bug even before you took time to write a test for it. In some cases, the bug may be difficult to troubleshoot and a smaller test case would be helpful. User definable examples defined in `examples` will be automatically reduced by fast-check if they fail.
```js
function buildQuickLookup(values) {
const fastValues = Object.fromEntries(values.map((value) => [value, true]));
return { has: (value) => value in fastValues };
}
fc.assert(
fc.property(fc.array(fc.string()), fc.string(), (allValues, lookForValue) => {
// Arrange
const expectedResult = allValues.includes(lookForValue);
// Act
const cache = buildQuickLookup(allValues);
// Assert
return cache.has(lookForValue) === expectedResult;
}),
{
examples: [
// the user definable corner case to reduce
[[], '__proto__'],
],
},
);
```
Although, most built-in arbitraries come with built-in support for automatic shrinking on user definable values, some minor ajustments might be required on your arbitraries:
- Arbitraries being the result of `.map` have to define the `unmapper` function if they want to be able to shrink user values.
- Arbitraries being the result of `.chain` are not supported at the moment.
- In predicate mode relying on `gen` is not supported at the moment.
- No special treatment needed for: `record`, `string` and many others.
```js
fc.assert(
fc.property(
fc.array(fc.string()).map(
(arr) => arr.join(','),
(raw) => {
// unmapper is supposed to handle not supported values by throwing
if (typeof raw !== 'string') throw new Error('Unsupported');
// remaining is supported
return raw.split(',');
},
),
myCheckFunction,
),
{
examples: [
// the user definable corner case to reduce
['__,proto,__'],
],
},
);
```
---
## Any
Combine and enhance any existing arbitraries.
### option
Randomly chooses between producing a value using the underlying arbitrary or returning nil
**Signatures:**
- `fc.option(arb)`
- `fc.option(arb, {freq?, nil?, depthSize?, maxDepth?, depthIdentifier?})`
**with:**
- `arb` — _arbitrary that will be called to generate normal values_
- `freq?` — default: `5` — _probability to build the nil value is of 1 / freq_
- `nil?` — default: `null` — _nil value_
- `depthSize?` — default: `undefined` [more](/docs/configuration/larger-entries-by-default/#depth-size-explained) — _how much we allow our recursive structures to be deep? The chance to select the nil value will increase as we go deeper in the structure_
- `maxDepth?` — default: `Number.POSITIVE_INFINITY` — _when reaching maxDepth, only nil could be produced_
- `depthIdentifier?` — default: `undefined` — _share the depth between instances using the same `depthIdentifier`_
**Usages:**
```js
fc.option(fc.nat());
// Examples of generated values: 28, 18, 2001121804, 2147483643, 12456933…
fc.option(fc.nat(), { freq: 2 });
// Examples of generated values: 2092622486, 1230277526, null, 2147483643, 4…
fc.option(fc.nat(), { freq: 2, nil: Number.NaN });
// Examples of generated values: 1296947745, Number.NaN, 1907314275, 16, 620249083…
fc.option(fc.string(), { nil: undefined });
// Examples of generated values: "p:s", "", "ot(RM", "|", "2MyPDrq6"…
// fc.option fits very well with recursive stuctures built using fc.letrec.
// Examples of such recursive structures are available with fc.letrec.
```
Resources: [API reference](/docs/api/functions/option).
Available since 0.0.6.
### oneof
Generate one value based on one of the passed arbitraries
Randomly chooses an arbitrary at each new generation. Should be provided with at least one arbitrary. Probability to select a specific arbitrary is based on its weight: `weight(instance) / sumOf(weights)` (for depth=0). For higher depths, the probability to select the first arbitrary will increase as we go deeper in the tree so the formula is not applicable as-is. It preserves the shrinking capabilities of the underlying arbitrary. `fc.oneof` is able to shrink inside the failing arbitrary but not across arbitraries (contrary to `fc.constantFrom` when dealing with constant arbitraries) except if called with `withCrossShrink`.
:::warning[First arbitrary, a privileged one]
The first arbitrary specified on `oneof` will have a privileged position. Constraints like `withCrossShrink` or `depthSize` tend to favor it over others.
:::
**Signatures:**
- `fc.oneof(...arbitraries)`
- `fc.oneof({withCrossShrink?, maxDepth?, depthSize?, depthIdentifier?}, ...arbitraries)`
**with:**
- `...arbitraries` — _arbitraries that could be used to generate a value. The received instances can either be raw instances of arbitraries (meaning weight is 1) or objects containing the arbitrary and its associated weight (integer value ≥0)_
- `withCrossShrink?` — default: `false` — _in case of failure the shrinker will try to check if a failure can be found by using the first specified arbitrary. It may be pretty useful for recursive structures as it can easily help reducing their depth in case of failure_
- `maxDepth?` — default: `Number.POSITIVE_INFINITY` — _when reaching maxDepth, the first arbitrary will be used to generate the value_
- `depthSize?` — default: `undefined` [more](/docs/configuration/larger-entries-by-default/#depth-size-explained) — _how much we allow our recursive structures to be deep? The chance to select the first specified arbitrary will increase as we go deeper in the structure_
- `depthIdentifier?` — default: `undefined` — _share the depth between instances using the same `depthIdentifier`_
**Usages:**
```js
fc.oneof(fc.string(), fc.boolean());
// Note: Equivalent to:
// fc.oneof(
// { arbitrary: fc.string(), weight: 1 },
// { arbitrary: fc.boolean(), weight: 1 },
// )
// Examples of generated values: false, "x ", "\"AXf", "x%", true…
fc.oneof(fc.string(), fc.boolean(), fc.nat());
// Note: Equivalent to:
// fc.oneof(
// { arbitrary: fc.string(), weight: 1 },
// { arbitrary: fc.boolean(), weight: 1 },
// { arbitrary: fc.nat(), weight: 1 },
// )
// Examples of generated values: "a:m[nG+", 2147483628, "le@o|g4", 1039477336, 1961824130…
fc.oneof({ arbitrary: fc.string(), weight: 5 }, { arbitrary: fc.boolean(), weight: 2 });
// Examples of generated values: "y", "u F(AR", true, ">,?4", false…
// fc.oneof fits very well with recursive stuctures built using fc.letrec.
// Examples of such recursive structures are available with fc.letrec.
```
Resources: [API reference](/docs/api/functions/oneof).
Available since 0.0.1.
### clone
Multiple identical values (they might not equal in terms of `===` or `==`).
Generate tuple containing multiple instances of the same value - values are independent from each others.
**Signatures:**
- `fc.clone(arb, numValues)`
**with:**
- `arb` — _arbitrary instance responsible to generate values_
- `numValues` — _number of clones (including itself)_
**Usages:**
```js
fc.clone(fc.nat(), 2);
// Examples of generated values: [1395148595,1395148595], [7,7], [1743838935,1743838935], [879259091,879259091], [2147483640,2147483640]…
fc.clone(fc.nat(), 3);
// Examples of generated values:
// • [163289042,163289042,163289042]
// • [287842615,287842615,287842615]
// • [1845341787,1845341787,1845341787]
// • [1127181441,1127181441,1127181441]
// • [5,5,5]
// • …
```
Resources: [API reference](/docs/api/functions/clone).
Available since 2.5.0.
### chainUntil
Build an arbitrary by iteratively chaining arbitraries until the chainer returns undefined.
Starting from a value produced by `startArb`, the `chainer` function is called with the current value to produce the next arbitrary. This process repeats until `chainer` returns `undefined`. The final value in the chain is the one produced by this arbitrary.
The implementation is fully iterative (non-recursive) and supports shrinking. It can handle long chains without stack overflow.
**Signatures:**
- `fc.chainUntil(startArb, chainer)`
**with:**
- `startArb` — _arbitrary producing the initial value of the chain_
- `chainer` — _function called with the current value that returns either the next arbitrary to generate from or `undefined` to stop the chain_
**Usages:**
```js
fc.chainUntil(
fc.nat(20).map((n) => [n]),
(tuple) => (tuple[tuple.length - 1] > 10 ? fc.nat(20).map((n) => [...tuple, n]) : undefined),
);
// Note: Start from a tuple containing one value in 0..20, then keep appending another value in 0..20 while the last appended value is greater than 10
// Examples of generated values: [14,6], [2], [1], [20,2], [18,17,13,3]…
```
Resources: [API reference](/docs/api/functions/chainUntil).
Available since 4.8.0.
### noBias
Drop bias from an existing arbitrary. Instead of being more likely to generate certain values the resulting arbitrary will be close to an equi-probable generator.
**Signatures:**
- `fc.noBias(arb)`
**with:**
- `arb` — _arbitrary instance responsible to generate values_
**Usages:**
```js
fc.noBias(fc.nat());
// Note: Compared to fc.nat() alone, the generated values are evenly distributed in
// the range 0 to 0x7fffffff making small values much more unlikely.
// Examples of generated values: 394798768, 980149687, 1298483622, 1164017931, 646759550…
```
Resources: [API reference](/docs/api/functions/noBias).
Available since 3.20.0.
### noShrink
Drop shrinking capabilities from an existing arbitrary.
:::warning[Avoid dropping shrinking capabilities]
Although dropping the shrinking capabilities can speed up your CI when failures occur, we do not recommend this approach. Instead, if you want to reduce the shrinking time for automated jobs or local runs, consider using `endOnFailure` or `interruptAfterTimeLimit`.
The only potentially legitimate use of dropping shrinking is when creating new complex arbitraries. In such cases, dropping useless parts of the shrinker may prove useful.
:::
**Signatures:**
- `fc.noShrink(arb)`
**with:**
- `arb` — _arbitrary instance responsible to generate values_
**Usages:**
```js
fc.noShrink(fc.nat());
// Examples of generated values: 1395148595, 7, 1743838935, 879259091, 2147483640…
```
Resources: [API reference](/docs/api/functions/noShrink).
Available since 3.20.0.
### limitShrink
Limit shrinking capabilities of an existing arbitrary. Cap the number of potential shrunk values it could produce.
:::warning[Avoid limiting shrinking capabilities]
Although limiting the shrinking capabilities can speed up your CI when failures occur, we do not recommend this approach. Instead, if you want to reduce the shrinking time for automated jobs or local runs, consider using `endOnFailure` or `interruptAfterTimeLimit`.
The only potentially legitimate use of limiting shrinking is when creating new complex arbitraries. In such cases, limiting some less relevant parts may help preserve shrinking capabilities without requiring exhaustive coverage of the shrinker.
:::
**Signatures:**
- `fc.limitShrink(arb, maxShrinks)`
**with:**
- `arb` — _arbitrary instance responsible to generate values_
- `maxShrinks` — _the maximal number of shrunk values that could be pulled from the arbitrary in case of shrink_
**Usages:**
```js
fc.limitShrink(fc.nat(), 3);
// Examples of generated values: 487640477, 1460784921, 1601237202, 1623804274, 5…
```
Resources: [API reference](/docs/api/functions/limitShrink).
Available since 3.20.0.
### .filter
Filter an existing arbitrary.
**Signatures:**
- `.filter(predicate)`
**with:**
- `predicate` — _only keeps values such as `predicate(value) === true`_
**Usages:**
```js
fc.integer().filter((n) => n % 2 === 0);
// Note: Only produce even integer values
// Examples of generated values: -1582642274, 2147483644, 30, -902884124, -20…
fc.integer().filter((n) => n % 2 !== 0);
// Note: Only produce odd integer values
// Examples of generated values: 925226031, -1112273465, 29, -1459401265, 21…
fc.string().filter((s) => s[0] < s[1]);
// Note: Only produce strings with `s[0] < s[1]`
// Examples of generated values: "Aa]tp>", "apply", "?E%a$n x", "#l\"/L\"x&S{", "argument"…
```
Resources: [API reference](/docs/api/classes/Arbitrary#filter).
Available since 0.0.1.
### .map
Map an existing arbitrary.
**Signatures:**
- `.map(mapper)`
**with:**
- `mapper` — _transform the produced value into another one_
**Usages:**
```js
fc.nat(1024).map((n) => n * n);
// Note: Produce only square values
// Examples of generated values: 36, 24336, 49, 186624, 1038361…
fc.nat().map((n) => String(n));
// Note: Change the type of the produced value from number to string
// Examples of generated values: "2147483619", "12", "468194571", "14", "5"…
fc.tuple(fc.integer(), fc.integer()).map((t) => (t[0] < t[1] ? [t[0], t[1]] : [t[1], t[0]]));
// Note: Generate a range [min, max]
// Examples of generated values: [-1915878961,27], [-1997369034,-1], [-1489572084,-370560927], [-2133384365,28], [-1695373349,657254252]…
fc.string().map((s) => `[${s.length}] -> ${s}`);
// Examples of generated values: "[3] -> ref", "[8] -> xeE:81|z", "[9] -> B{1Z\\sxWa", "[3] -> key", "[1] -> _"…
```
Resources: [API reference](/docs/api/classes/Arbitrary#map).
Available since 0.0.1.
### .chain
Flat-Map an existing arbitrary.
:::warning[Limited shrink]
Be aware that the shrinker of such construct might not be able to shrink as much as possible (more details [here](https://github.com/dubzzz/fast-check/issues/650#issuecomment-648397230))
:::
**Signatures:**
- `.chain(fmapper)`
**with:**
- `fmapper` — _produce an arbitrary based on a generated value_
**Usages:**
```js
fc.nat().chain((min) => fc.tuple(fc.constant(min), fc.integer({ min, max: 0xffffffff })));
// Note: Produce a valid range
// Examples of generated values: [1211945858,4294967292], [1068058184,2981851306], [2147483626,2147483645], [1592081894,1592081914], [2147483623,2147483639]…
```
Resources: [API reference](/docs/api/classes/Arbitrary#chain).
Available since 1.2.0.
---
## Constant
Promote any set of constant values to arbitraries.
### constant
Always produce the same value
**Signatures:**
- `fc.constant(value)`
**with:**
- `value` — _value that will be produced by the arbitrary_
**Usages:**
```js
fc.constant(1);
// Examples of generated values: 1…
fc.constant({});
// Examples of generated values: {}…
```
Resources: [API reference](/docs/api/functions/constant).
Available since 0.0.1.
### constantFrom
One of the values specified as argument.
Randomly chooses among the provided values. It considers the first value as the default value so that in case of failure it will shrink to it. It expects a minimum of one value and throws whether it receives no value as parameters. It can easily be used on arrays with `fc.constantFrom(...myArray)`.
**Signatures:**
- `fc.constantFrom(...values)`
**with:**
- `...values` — _all the values that could possibly be generated by the arbitrary_
**Usages:**
```js
fc.constantFrom(1, 2, 3);
// Examples of generated values: 1, 3, 2…
fc.constantFrom(1, 'string', {});
// Examples of generated values: 1, "string", {}…
```
Resources: [API reference](/docs/api/functions/constantFrom).
Available since 0.0.12.
### mapToConstant
Map indexes to values.
Generate non-contiguous ranges of values by mapping integer values to constant.
**Signatures:**
- `fc.mapToConstant(...{ num, build })`
**with:**
- `...{ num, build }` — _describe how to map integer values to their final values. For each entry, the entry defines `num` corresponding to the number of integer values it covers and `build`, a method that will produce a value given an integer in the range `0` (included) to `num - 1` (included)_
**Usages:**
```js
fc.mapToConstant(
{ num: 26, build: (v) => String.fromCharCode(v + 0x61) },
{ num: 10, build: (v) => String.fromCharCode(v + 0x30) },
);
// Examples of generated values: "6", "8", "d", "9", "r"…
```
Resources: [API reference](/docs/api/functions/mapToConstant).
Available since 1.14.0.
### subarray
Generate values corresponding to any possible sub-array of an original array.
Values of the resulting subarray are ordered the same way they were in the original array.
**Signatures:**
- `fc.subarray(originalArray)`
- `fc.subarray(originalArray, {minLength?, maxLength?})`
**with:**
- `originalArray` — _the array from which we want to extract sub-arrays_
- `minLength?` — default: `0` — _minimal length (included)_
- `maxLength?` — default: `originalArray.length` — _maximal length (included)_
**Usages:**
```js
fc.subarray([1, 42, 48, 69, 75, 92]);
// Examples of generated values: [], [1,48,69,75,92], [48], [1,42,75], [1,48,75,92]…
fc.subarray([1, 42, 48, 69, 75, 92], { minLength: 5 });
// Examples of generated values: [1,42,48,69,75], [1,42,48,69,92], [1,42,48,75,92], [42,48,69,75,92], [1,42,69,75,92]…
fc.subarray([1, 42, 48, 69, 75, 92], { maxLength: 5 });
// Examples of generated values: [48,75], [1], [], [48,92], [69,75]…
fc.subarray([1, 42, 48, 69, 75, 92], { minLength: 2, maxLength: 3 });
// Examples of generated values: [48,75], [48,69,92], [42,75], [69,92], [1,42]…
```
Resources: [API reference](/docs/api/functions/subarray).
Available since 1.5.0.
### shuffledSubarray
Generate values corresponding to any possible sub-array of an original array.
Values of the resulting subarray are ordered randomly.
**Signatures:**
- `fc.shuffledSubarray(originalArray)`
- `fc.shuffledSubarray(originalArray, {minLength?, maxLength?})`
**with:**
- `originalArray` — _the array from which we want to extract sub-arrays_
- `minLength?` — default: `0` — _minimal length (included)_
- `maxLength?` — default: `originalArray.length` — _maximal length (included)_
**Usages:**
```js
fc.shuffledSubarray([1, 42, 48, 69, 75, 92]);
// Examples of generated values: [69,92], [92,69,42,75], [48,69,92,75,42,1], [1,42], [75]…
fc.shuffledSubarray([1, 42, 48, 69, 75, 92], { minLength: 5 });
// Examples of generated values: [48,1,92,69,75,42], [42,1,92,75,69], [69,75,92,48,1], [92,42,48,75,69], [1,69,75,92,42]…
fc.shuffledSubarray([1, 42, 48, 69, 75, 92], { maxLength: 5 });
// Examples of generated values: [48,1,92], [], [75,1,69,92], [42], [75,1,69,48,42]…
fc.shuffledSubarray([1, 42, 48, 69, 75, 92], { minLength: 2, maxLength: 3 });
// Examples of generated values: [1,92], [92,75], [1,48], [42,75], [48,69]…
```
Resources: [API reference](/docs/api/functions/shuffledSubarray).
Available since 1.5.0.
---
## Combiners
Combiners are the only arbitraries in fast-check that do not generate anything on their own. They take one or more existing arbitraries as input and return a new one. They are the functional glue that lets a handful of primitives and composites cover the full space of values a real codebase cares about.
You will reach for a combiner whenever you want to:
- **promote plain values** into the arbitrary world (`constant`, `constantFrom`),
- **choose between alternatives** (`oneof`, `option`),
- **tie arbitraries together recursively** (`letrec`) to generate trees, ASTs or JSON-like structures,
- **refine or transform** an existing arbitrary with `.filter`, `.map`, `.chain`, or adjust its shrinking with `noShrink` / `limitShrink`.
Because every combiner wraps another arbitrary, shrinking composes too: the combiner preserves (or deliberately limits) the shrink behaviour of the arbitrary it wraps, so a counterexample through `oneof(...).map(...)` still collapses toward the simple values defined by the innermost primitive.
```mdx-code-block
import DocCardList from '@theme/DocCardList';
```
---
## Recursive Structure
Define arbitraries able to generate recursive structures.
### letrec
Generate recursive structures.
Prefer `fc.letrec` over `fc.memo`. Most of the features offered by `fc.memo` can now be implemented with `fc.letrec`.
**Signatures:**
- `fc.letrec(builder)`
**with:**
- `builder` — _builder function defining how to build the recursive structure, it answers to the signature `(tie) => `object with key corresponding to the name of the arbitrary and with vaue the arbitrary itself. The `tie` function given to builder should be used as a placeholder to handle the recursion. It takes as input the name of the arbitrary to use in the recursion._
**Usages:**
```js
// Setup the tree structure:
const { tree } = fc.letrec((tie) => ({
// Warning: In version 2.x and before, there is no automatic control over the depth of the generated data-structures.
// As a consequence to avoid your data-structures to be too deep, it is highly recommended to add the constraint `depthFactor`
// onto your usages of `option` and `oneof` and to put the arbitrary without recursion first.
// In version 3.x, `depthSize` (previously `depthFactor`) and `withCrossShrink` will be enabled by default.
tree: fc.oneof({ depthSize: 'small', withCrossShrink: true }, tie('leaf'), tie('node')),
node: fc.record({
left: tie('tree'),
right: tie('tree'),
}),
leaf: fc.nat(),
}));
// Use the arbitrary:
tree;
// Examples of generated values:
// • 1948660480
// • {"left":2147483625,"right":28}
// • {__proto__:null,"left":{__proto__:null,"left":21,"right":2147483628},"right":2147483619}
// • 423794071
// • 27
// • …
fc.letrec((tie) => ({
node: fc.record({
value: fc.nat(),
left: fc.option(tie('node'), { maxDepth: 1, depthIdentifier: 'tree' }),
right: fc.option(tie('node'), { maxDepth: 1, depthIdentifier: 'tree' }),
}),
})).node;
// Note: You can limit the depth of the generated structrures by using the constraint `maxDepth` (see `option` and `oneof`).
// On the example above we need to specify `depthIdentifier` to share the depth between left and right branches...
// Examples of generated values:
// • {__proto__:null,"value":2147483632,"left":{__proto__:null,"value":1485877161,"left":null,"right":null},"right":{__proto__:null,"value":685791529,"left":null,"right":null}}
// • {__proto__:null,"value":1056088736,"left":null,"right":{__proto__:null,"value":2147483623,"left":null,"right":null}}
// • {"value":1227733267,"left":{"value":21,"left":null,"right":null},"right":{"value":2147483644,"left":null,"right":null}}
// • {"value":17,"left":null,"right":{"value":12,"left":null,"right":null}}
// • {"value":17,"left":{__proto__:null,"value":12,"left":null,"right":null},"right":{__proto__:null,"value":591157184,"left":null,"right":null}}
// • …
// Setup the depth identifier shared across all nodes:
const depthIdentifier = fc.createDepthIdentifier();
// Use the arbitrary:
fc.letrec((tie) => ({
node: fc.record({
value: fc.nat(),
left: fc.option(tie('node'), { maxDepth: 1, depthIdentifier }),
right: fc.option(tie('node'), { maxDepth: 1, depthIdentifier }),
}),
})).node;
// Note: Calling `createDepthIdentifier` is another way to pass a value for `depthIdentifier`. Compared to the string-based
// version, demo-ed in the snippet above, it has the benefit to never collide with other identifiers manually specified.
// Examples of generated values:
// • {__proto__:null,"value":2147483645,"left":{"value":9,"left":null,"right":null},"right":null}
// • {__proto__:null,"value":7,"left":null,"right":{__proto__:null,"value":96999551,"left":null,"right":null}}
// • {"value":3,"left":{__proto__:null,"value":1312350013,"left":null,"right":null},"right":null}
// • {"value":2051975271,"left":{"value":2147483645,"left":null,"right":null},"right":{"value":1305755095,"left":null,"right":null}}
// • {"value":2,"left":{"value":1530374940,"left":null,"right":null},"right":null}
// • …
fc.letrec((tie) => ({
node: fc.record({
value: fc.nat(),
left: fc.option(tie('node'), { maxDepth: 1 }),
right: fc.option(tie('node'), { maxDepth: 1 }),
}),
})).node;
// ...If we don't specify it, the maximal number of right in a given path will be limited to 1, but may include intermediate left.
// Thus the resulting trees might be deeper than 1.
// Examples of generated values:
// • {__proto__:null,"value":14,"left":{__proto__:null,"value":1703987241,"left":null,"right":{"value":643118365,"left":null,"right":null}},"right":{__proto__:null,"value":1029204262,"left":{__proto__:null,"value":1968117159,"left":null,"right":null},"right":null}}
// • {__proto__:null,"value":26,"left":{__proto__:null,"value":1662273887,"left":null,"right":{__proto__:null,"value":525337883,"left":null,"right":null}},"right":{__proto__:null,"value":797448699,"left":{"value":657617990,"left":null,"right":null},"right":null}}
// • {__proto__:null,"value":2121842454,"left":null,"right":{"value":1835255719,"left":{__proto__:null,"value":1989636808,"left":null,"right":null},"right":null}}
// • {"value":1438784023,"left":{__proto__:null,"value":24,"left":null,"right":{__proto__:null,"value":420442369,"left":null,"right":null}},"right":{"value":9,"left":{__proto__:null,"value":1424795296,"left":null,"right":null},"right":null}}
// • {__proto__:null,"value":1331332801,"left":null,"right":{__proto__:null,"value":1001840875,"left":{__proto__:null,"value":1327656949,"left":null,"right":null},"right":null}}
// • …
fc.letrec((tie) => ({
tree: fc.oneof({ maxDepth: 2 }, { arbitrary: tie('leaf'), weight: 0 }, { arbitrary: tie('node'), weight: 1 }),
node: fc.record({ left: tie('tree'), right: tie('tree') }),
leaf: fc.nat(),
})).tree;
// Note: Exact depth of 2: not more not less.
// Note: If you use multiple `option` or `oneof` to define such recursive structure
// you may want to specify a `depthIdentifier` so that they share the exact same depth.
// See examples above for more details.
// Examples of generated values:
// • {__proto__:null,"left":{"left":1313545969,"right":13},"right":{"left":9,"right":27}}
// • {"left":{__proto__:null,"left":17,"right":5},"right":{__proto__:null,"left":874941432,"right":25}}
// • {"left":{"left":18,"right":1121202},"right":{"left":831642574,"right":1975057275}}
// • {__proto__:null,"left":{__proto__:null,"left":1542103881,"right":9},"right":{__proto__:null,"left":1645153719,"right":21}}
// • {"left":{__proto__:null,"left":749002681,"right":2069272340},"right":{__proto__:null,"left":16,"right":16}}
// • …
fc.statistics(
fc.letrec((tie) => ({
node: fc.record({
value: fc.nat(),
left: fc.option(tie('node')),
right: fc.option(tie('node')),
}),
})).node,
(v) => {
function size(n) {
if (n === null) return 0;
else return 1 + size(n.left) + size(n.right);
}
const s = size(v);
let lower = 1;
const next = (n) => (String(n)[0] === '1' ? n * 5 : n * 2);
while (next(lower) <= s) {
lower = next(lower);
}
return `${lower} to ${next(lower) - 1} items`;
},
);
// Computed statistics for 10k generated values:
// For size = "xsmall":
// • 5 to 9 items....42.99%
// • 10 to 49 items..39.82%
// • 1 to 4 items....17.19%
// For size = "small":
// • 10 to 49 items..85.95%
// • 5 to 9 items.....5.35%
// • 1 to 4 items.....4.35%
// • 50 to 99 items...4.35%
// For size = "medium":
// • 100 to 499 items..83.03%
// • 50 to 99 items....10.05%
// • 1 to 4 items.......3.78%
// • 10 to 49 items.....2.93%
// • 5 to 9 items.......0.14%
fc.statistics(
fc.letrec((tie) => ({
node: fc.record({
value: fc.nat(),
children: fc.oneof(
{ depthIdentifier: 'node' },
fc.constant([]),
fc.array(tie('node'), { depthIdentifier: 'node' }),
),
}),
})).node,
(v) => {
function size(n) {
if (n === null) return 0;
else return 1 + n.children.reduce((acc, child) => acc + size(child), 0);
}
const s = size(v);
let lower = 1;
const next = (n) => (String(n)[0] === '1' ? n * 5 : n * 2);
while (next(lower) <= s) {
lower = next(lower);
}
return `${lower} to ${next(lower) - 1} items`;
},
);
// Computed statistics for 10k generated values:
// For size = "xsmall":
// • 1 to 4 items..100.00%
// For size = "small":
// • 1 to 4 items....60.16%
// • 10 to 49 items..23.99%
// • 5 to 9 items....15.83%
// • 50 to 99 items...0.02%
// For size = "medium":
// • 1 to 4 items......51.31%
// • 50 to 99 items....26.41%
// • 10 to 49 items....16.16%
// • 100 to 499 items...5.93%
// • 5 to 9 items.......0.14%
```
Resources: [API reference](/docs/api/functions/letrec).
Available since 1.16.0.
### memo
Generate recursive structures.
:::tip[Prefer `fc.letrec` when feasible]
Initially `fc.memo` has been designed to offer a higher control over the generated depth. Unfortunately it came with a cost: the arbitrary itself is costly to build.
Most of the features offered by `fc.memo` can now be done using `fc.letrec` coupled with `fc.option` or `fc.oneof`.
Whenever possible, we recommend using `fc.letrec` instead of `fc.memo`.
:::
**Signatures:**
- `fc.memo(builder)`
**with:**
- `builder` — _builder function defining how to build the recursive structure. It receives as input the remaining depth and has to return an arbitrary (potentially another `memo` or itself)_
**Usages:**
```js
// Setup the tree structure:
const tree = fc.memo((n) => fc.oneof(leaf(), node(n)));
const node = fc.memo((n) => {
if (n <= 1) return fc.record({ left: leaf(), right: leaf() });
return fc.record({ left: tree(), right: tree() }); // tree() is equivalent to tree(n-1)
});
const leaf = fc.nat;
// Use the arbitrary:
tree(2);
// Note: Only produce trees having a maximal depth of 2
// Examples of generated values:
// • 24
// • {"left":{__proto__:null,"left":1696460155,"right":2147483646},"right":135938859}
// • 9
// • {"left":27,"right":{"left":2147483633,"right":2147483631}}
// • {"left":29,"right":{"left":2,"right":367441398}}
// • …
```
Resources: [API reference](/docs/api/functions/memo).
Available since 1.16.0.
### entityGraph
Generate interconnected entities with relationships based on a schema definition.
This arbitrary creates structured data where entities can reference each other through defined relationships. The generated values automatically include links between entities, making it ideal for testing graph structures, relational data, or interconnected object models. Unlike `fc.letrec`, this helper supports cycles and shared references between instances by default, though these can be controlled through strategy options.
The output is an object where each key corresponds to an entity type and the value is an array of entities of that type. Entities contain both their data fields and relationship links.
**Signatures:**
- `fc.entityGraph(arbitraries, relations)`
- `fc.entityGraph(arbitraries, relations, {initialPoolConstraints?,unicityConstraints?,noNullPrototype?})`
**with:**
- `arbitraries` — _defines the data fields for each entity type (non-relational properties). This is a record where each key is an entity type name and the value defines the arbitraries for that entity's fields, similar to `fc.record`_
- `relations` — _defines how entities reference each other (relational properties). This is a record where each key is an entity type name and the value defines the relationships from that entity to others_
- _each relationship has the structure: `{arity, type, strategy?}` or `{arity: 'inverse', type, forwardRelationship}`_
- `arity` — _cardinality of the relationship. `"0-1"` for an optional reference (produces undefined or a single instance), `"1"` for a required reference (always produces a single instance), `"many"` for a multi-valued reference (produces an array, possibly empty, with no duplicate references based on object identity), `"inverse"` for an inverse relationship (automatically computed array of entities that reference this entity through a specified forward relationship)_
- `type` — _the name of the target entity type (must be one of the keys in `arbitraries`)_
- `strategy?` — default: `'any'` — _constrains which target entities are eligible (not applicable for inverse relationships). `'any'` means no restrictions, `'exclusive'` means each target can only be referenced once (prevents sharing), `'successor'` means target must appear after the source in the entity array (prevents cycles and self-references)_
- `forwardRelationship` — _for inverse relationships only: the name of the forward relationship property in the target type that references this entity type. The inverse relationship will automatically contain all entities that reference this entity through that forward relationship_
- `initialPoolConstraints?` — _controls the number of entities generated for each entity type in the initial pool (baseline set created before relationships are established). Provide an object mapping entity type names to constraints objects with `minLength?` and `maxLength?` properties (same as used by `fc.array`). Other entities may be created later to satisfy relationship requirements_
- `unicityConstraints?` — _defines uniqueness criteria for entities of each type to prevent duplicates. Provide a selector function that extracts a key from each entity. Entities with identical keys (compared using `Object.is`) are considered duplicates and only one instance will be kept_
- `noNullPrototype?` — default: `false` — _do not generate values with null prototype, only generate objects based on the Object-prototype_
**Usages:**
```js
fc.entityGraph(
{ node: { id: fc.stringMatching(/^[A-Z][a-z]*$/) } },
{ node: { linkTo: { arity: 'many', type: 'node' } } },
{
initialPoolConstraints: { node: { maxLength: 1 } },
unicityConstraints: { node: (value) => value.id },
noNullPrototype: true,
},
);
// Note: Generate a directed graph where nodes can link to multiple other nodes
// - Entity type: node with an id field (string matching pattern)
// - Relationship: linkTo with arity 'many' allows each node to reference zero or more other nodes
// - Produces: { node: [{ id: "Abc", linkTo: [, ] }, ...] }
// Characteristics of this configuration:
// - Enforces unique ids (unicityConstraints)
// - Allows cycles between nodes (e.g., A → B → C → A) — use strategy: 'successor' to prevent
// - Allows self-references (e.g., A → A) — use strategy: 'successor' to prevent
// - Creates a single connected graph (maxLength: 1 in initialPoolConstraints) — remove this constraint to allow multiple disconnected graphs
// Examples of generated values:
// • {"node":[{"id":"Sp","linkTo":[,,,,,]},{"id":"Scziyybceal","linkTo":[,,,,]},{"id":"Apkltuab","linkTo":[,,,]},{"id":"Yn","linkTo":[]},{"id":"S","linkTo":[,,,]},{"id":"Wddc","linkTo":[]},{"id":"Mh","linkTo":[]},{"id":"Zub","linkTo":[,,,,,,,,]},{"id":"Y","linkTo":[,,,,,,,,,]},{"id":"Begw","linkTo":[]},{"id":"Ednakec","linkTo":[]}]}
// • {"node":[{"id":"Oarguments","linkTo":[,,,,,]},{"id":"Ffzk","linkTo":[,,,,,,,,]},{"id":"Xe","linkTo":[,,,,,,,,]},{"id":"Zarguments","linkTo":[,,,,,,]},{"id":"Hcwyeygjpo","linkTo":[,,,,,,,,,]},{"id":"Ed","linkTo":[]},{"id":"Wcaller","linkTo":[]},{"id":"Xvz","linkTo":[,,,]},{"id":"Dryzdsxja","linkTo":[,,,,,,,,,,,]},{"id":"Dxmzwrjicoa","linkTo":[,]},{"id":"Bwoorugv","linkTo":[,,,,]},{"id":"Eamjkuym","linkTo":[,,]}]}
// • {"node":[{"id":"Cetc","linkTo":[,,,,,,,]},{"id":"Wco","linkTo":[]},{"id":"Jref","linkTo":[,,,,,,]},{"id":"Bro","linkTo":[,