(key: string, value: V)
| 61 | } |
| 62 | |
| 63 | remove(key: string, value: V) { |
| 64 | if(!this.index[key]) return false; |
| 65 | |
| 66 | let ix = this.index[key].indexOf(value) |
| 67 | if(ix !== -1) { |
| 68 | if(!this.dirty[key]) this.dirty[key] = []; |
| 69 | this.index[key][ix] = this.index[key].pop()!; |
| 70 | this.dirty[key].push(value); |
| 71 | return true; |
| 72 | } |
| 73 | return false; |
| 74 | } |
| 75 | }; |
| 76 | |
| 77 | interface IndexedScalar<V>{[v: string]: V} |
no outgoing calls
no test coverage detected