(code: number | null | undefined)
| 143 | } |
| 144 | |
| 145 | function close(code: number | null | undefined): true { |
| 146 | process.removeListener('uncaughtException', closeWithError); |
| 147 | // removing a non-existent listener is a no-op |
| 148 | process.stdin.removeListener('end', close); |
| 149 | if (configWatcher) configWatcher.close(); |
| 150 | Promise.resolve(watcher?.close()).finally(() => { |
| 151 | process.exit(typeof code === 'number' ? code : 0); |
| 152 | }); |
| 153 | // Tell signal-exit that we are handling this gracefully |
| 154 | return true; |
| 155 | } |
| 156 | |
| 157 | // return a promise that never resolves to keep the process running |
| 158 | return new Promise(() => {}); |
nothing calls this directly
no test coverage detected
searching dependent graphs…