function unsupported(name: string): never {
  throw new Error(`${name} is not available in the browser build`);
}

export function spawn() {
  return unsupported("child_process.spawn");
}

export function fork() {
  return unsupported("child_process.fork");
}

export function exec() {
  return unsupported("child_process.exec");
}

export function execFile() {
  return unsupported("child_process.execFile");
}

export default { spawn, fork, exec, execFile };

