Skip to main content

Type Alias: RecordConstraints<T>

RecordConstraints<T> = object

Defined in: packages/fast-check/src/arbitrary/record.ts:12

Constraints to be applied on record

Remarks

Since 0.0.12

Type Parameters

Type ParameterDefault type
Tunknown

Properties

noNullPrototype?

optional noNullPrototype?: boolean

Defined in: packages/fast-check/src/arbitrary/record.ts:29

Do not generate records with null prototype

Default Value

false

Remarks

Since 3.13.0


requiredKeys?

optional requiredKeys?: T[]

Defined in: packages/fast-check/src/arbitrary/record.ts:23

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

Array containing all keys of recordModel

Remarks

Since 2.11.0