Add stop functions
This commit is contained in:
parent
cb06b8daf6
commit
96fa34eecf
2 changed files with 26 additions and 0 deletions
|
@ -60,4 +60,10 @@ export class EnhancedMap<K, V> extends Map<K, V> {
|
|||
this.set(key, def);
|
||||
return def;
|
||||
}
|
||||
|
||||
public remove(key: K): V {
|
||||
const v = this.get(key);
|
||||
this.delete(key);
|
||||
return v;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue