export class MultiMap < K , V > extends Map < K , V [ ] > { add ( key , value ) { const values = this . get ( key ) ; if ( values ) { values . push ( value ) ; } else { this . set ( key , [ value ] ) ; } return this ; } }