API Reference | fast-check | Property based testing framework
    Preparing search index...

    Type Alias RecordConstraints<T>

    Constraints to be applied on record

    Since 0.0.12

    type RecordConstraints<T = unknown> = {
        noNullPrototype?: boolean;
        requiredKeys?: T[];
    }

    Type Parameters

    • T = unknown
    Index

    Properties

    noNullPrototype?: boolean

    Do not generate records with null prototype

    false
    

    Since 3.13.0

    requiredKeys?: T[]

    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.

    Array containing all keys of recordModel
    

    Since 2.11.0