RecordConstraints: { noNullPrototype?: boolean; requiredKeys?: T[] }

Constraints to be applied on record

Type Parameters

  • T = unknown

Type declaration

  • OptionalnoNullPrototype?: boolean

    Do not generate records with null prototype

    false
    

    Since 3.13.0

  • OptionalrequiredKeys?: 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

Since 0.0.12