(self: HashMap<K, V>)
| 1064 | |
| 1065 | /** @internal */ |
| 1066 | export const beginMutation = <K, V>(self: HashMap<K, V>): HashMap<K, V> => { |
| 1067 | const impl = self as HashMapImpl<K, V> |
| 1068 | // An open source must stop editing the nodes it now shares with the new batch. |
| 1069 | const edit = impl._editable ? ++impl._edit : impl._edit + 1 |
| 1070 | return new HashMapImpl(true, edit, impl._root, impl._size) |
| 1071 | } |
| 1072 | |
| 1073 | /** @internal */ |
| 1074 | export const endMutation = <K, V>(self: HashMap<K, V>): HashMap<K, V> => { |