( channelChildProcessMap: Map<string, child_process.ChildProcess>, channel: string, )
| 1 | import * as child_process from 'child_process'; |
| 2 | |
| 3 | function killChannelChildProcess( |
| 4 | channelChildProcessMap: Map<string, child_process.ChildProcess>, |
| 5 | channel: string, |
| 6 | ) { |
| 7 | const childProcess = channelChildProcessMap.get(channel); |
| 8 | if (childProcess && childProcess.kill instanceof Function) { |
| 9 | // kill child process |
| 10 | childProcess.kill(); |
| 11 | channelChildProcessMap.delete(channel); |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | export default killChannelChildProcess; |
no outgoing calls
no test coverage detected