Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.

Commit 08b1a62

Browse files
committed
Implement delete method
1 parent 8eeabfe commit 08b1a62

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

arrayStringMap.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ export default class ArrayStringMap<K extends any[], V> implements Map<K, V> {
3535
}
3636

3737
delete(key: K): boolean {
38-
return false;
38+
const encoded = this.encodeArray(key)
39+
const retval = this._map.delete(encoded)
40+
this._converterInfo.delete(encoded);
41+
return retval;
3942
}
4043

4144
* entries(): IterableIterator<[K, V]> {

0 commit comments

Comments
 (0)