copy segments basics done

This commit is contained in:
FlorianZahn
2021-10-06 08:15:15 +02:00
parent 1a0ac27e49
commit 93f02877a7
3 changed files with 66 additions and 32 deletions

View File

@@ -120,6 +120,14 @@ class SBMap<T, U> extends Map {
this.update();
return result;
}
addArray(key: T, value: U) {
// Expand an array by value
let result = super.get(key).concat(value);
this.set(key, result);
this.update();
return result;
}
delete(key) {
const result = super.delete(key);