@geraintguan/ts-std-lib
    Preparing search index...

    Interface DefaultMapOptions<TKey, TValue, THashedKey, TDefaultValue>

    Options for creating a new map instance.

    interface DefaultMapOptions<
        TKey,
        TValue,
        THashedKey = TKey,
        TDefaultValue extends TValue = TValue,
    > {
        defaultValue:
            | { type: "function"; value: (key: TKey) => TDefaultValue }
            | { type: "value"; value: TDefaultValue };
        hash: (key: TKey) => THashedKey;
        name?: string;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    defaultValue:
        | { type: "function"; value: (key: TKey) => TDefaultValue }
        | { type: "value"; value: TDefaultValue }
    hash: (key: TKey) => THashedKey

    Function called to hash a key before storing or using it to access a value in the map.

    name?: string

    Optional human readable name for the map instance that is used for debugging purposes.

    Defaults to "unknown" if not set.