* Take out the information corresponding to the specified ID.
(id: string)
| 69 | * Take out the information corresponding to the specified ID. |
| 70 | */ |
| 71 | private put(id: string) { |
| 72 | const messageData = this.map.get(id); |
| 73 | if (!messageData) return; |
| 74 | this.map.delete(id); |
| 75 | messageData.timer && clearTimeout(messageData.timer); |
| 76 | return messageData; |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | export const messageMap = new MessageMap(); |