( path: string, process: ChildProcess )
| 117 | } |
| 118 | |
| 119 | function checkForPid( |
| 120 | path: string, |
| 121 | process: ChildProcess |
| 122 | ): asserts process is ChildProcess & { pid: number } { |
| 123 | if (!process.pid) { |
| 124 | throw new Error(`Child Process has no "pid" when forking: "${path}"`); |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | /** |
| 129 | * When launching a dev-server, we want to know its state. |