MCPcopy
hub / github.com/rollup/rollup / close

Function close

cli/run/watch-cli.ts:145–155  ·  view source on GitHub ↗
(code: number | null | undefined)

Source from the content-addressed store, hash-verified

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(() => {});

Callers

nothing calls this directly

Calls 1

closeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…