Hyperlinkv0.8.0-beta.28

MutableHashMap

MutableHashMap.isMutableHashMapconsteffect/MutableHashMap.ts:99
<K, V>(value: unknown): value is MutableHashMap<K, V>

Checks whether the specified value is a MutableHashMap, false otherwise.

When to use

Use to narrow an unknown value before treating it as a mutable hash map.

Details

The check looks for the MutableHashMap runtime marker.

Gotchas

The check does not validate the key or value types carried by the map.

refinementsMutableHashMap
export const isMutableHashMap = <K, V>(value: unknown): value is MutableHashMap<K, V> => hasProperty(value, TypeId)