Current section

Files

Jump to
plinth src child_process_ffi.mjs
Raw

src/child_process_ffi.mjs

import { Result$Ok, Result$Error } from "./gleam.mjs";
import child_process from "node:child_process"
export const kill = (childProcess) =>
childProcess.kill()
export const spawn = (cmd, args) =>
child_process.spawn(cmd, args.toArray())
export const stdin = (childProcess) =>
childProcess.stdin ? Result$Ok(childProcess.stdin) : Result$Error()