ts-type-forge
    Preparing search index...

    Type Alias MutableMap<K, V>

    MutableMap: Map<K, V>

    Alias for the standard Map<K, V> type. Represents a mutable map collection. Provided for consistency with naming conventions and to make intent explicit.

    Type Parameters

    • K

      The type of keys in the map.

    • V

      The type of values in the map.

    type UserCache = MutableMap<string, User>;
    const cache: UserCache = new Map();
    cache.set('user1', { id: 1, name: 'Alice' }); // ✓ allowed - map is mutable
    cache.delete('user1'); // ✓ allowed