(map: Map<string, any[]>)
| 119 | cb: (payload: InferCustomEventPayload<T>) => void, |
| 120 | ): void { |
| 121 | const addToMap = (map: Map<string, any[]>) => { |
| 122 | const existing = map.get(event) || [] |
| 123 | existing.push(cb) |
| 124 | map.set(event, existing) |
| 125 | } |
| 126 | addToMap(this.hmrClient.customListenersMap) |
| 127 | addToMap(this.newListeners) |
| 128 | } |