Function: constantFrom()
Call Signature
constantFrom<
T>(...values):Arbitrary<T>
Defined in: packages/fast-check/src/arbitrary/constantFrom.ts:19
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<T>
Remarks
Since 0.0.12
Call Signature
constantFrom<
TArgs>(...values):Arbitrary<TArgs[number]>
Defined in: packages/fast-check/src/arbitrary/constantFrom.ts:31
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<TArgs[number]>
Remarks
Since 0.0.12