MCPcopy Create free account
hub / github.com/codeaashu/claude-code / exit

Function exit

web/lib/terminal-compat.ts:42–51  ·  view source on GitHub ↗
(code?: number)

Source from the content-addressed store, hash-verified

40 * In the terminal this exits the process; in the browser it navigates to "/".
41 */
42export function exit(code?: number): never {
43 if (isWeb) {
44 if (typeof window !== "undefined") {
45 window.location.href = "/";
46 }
47 // Keep the never return type satisfied in TS
48 throw new Error(`exit(${code ?? 0})`);
49 }
50 process.exit(code ?? 0);
51}
52
53// ─── stdin/stdout stubs ───────────────────────────────────────────────────────
54

Callers 1

useAppStubFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected