ConstraintJS - v0.10.2
    Preparing search index...

    Interface MapConstraintOptions<K, V>

    Options for MapConstraint.

    interface MapConstraintOptions<K = any, V = any> {
        create_unsubstantiated?: boolean;
        equals?: EqualityCheck<K>;
        hash?: HashOption<K>;
        keys?: readonly K[];
        literal_values?: boolean;
        value?: Record<string, V>;
        valueequals?: EqualityCheck<V>;
        valuehash?: boolean | HashOption<V>;
        values?: readonly V[];
    }

    Type Parameters

    • K = any
    • V = any
    Index
    create_unsubstantiated?: boolean

    Reading a key that isn't set records a dependency anyway, so that the reader is updated if the key is added. Default: true

    equals?: EqualityCheck<K>

    How to compare keys. Default: ===

    hash?: HashOption<K>

    Speeds up looking up keys. Keys that are equal must have the same hash. A function, or the name of a method to call on each key. Default: String(key)

    keys?: readonly K[]

    Initial keys, paired with values. They come before any entries from value.

    literal_values?: boolean

    Treat function values as values, rather than as functions that compute them. Default: false

    value?: Record<string, V>

    Initial entries, taken from an object's own properties.

    valueequals?: EqualityCheck<V>

    How to compare values (for keyForValue). Default: ===

    valuehash?: boolean | HashOption<V>

    Speeds up keyForValue, like hash does for keys (true uses the default hash). Default: false

    values?: readonly V[]

    Initial values, paired with keys.