Skip to content

constant

constant<T>(x): Dependent<T>

It takes a constant value and creates an arbitrary out of it.

Example

random(constant("foobar"))
// => "foobar"
random(constant(1))
// => 1

Type Parameters

T

Parameters

x

T

The constant to make arbitrary.

Returns

Dependent<T>

A constant arbitrary.