({ onMessage })
| 102 | |
| 103 | return { |
| 104 | connect({ onMessage }) { |
| 105 | options.channel.api!.outsideEmitter.on('send', onMessage) |
| 106 | options.channel.api!.innerEmitter.emit( |
| 107 | 'vite:client:connect', |
| 108 | undefined, |
| 109 | hmrClient, |
| 110 | ) |
| 111 | onMessage({ type: 'connected' }) |
| 112 | handler = onMessage |
| 113 | }, |
| 114 | disconnect() { |
| 115 | if (handler) { |
| 116 | options.channel.api!.outsideEmitter.off('send', handler) |
no test coverage detected