import { Operation, Result, Stream } from "effection"; import { ExecOptions } from "@effectionx/process"; //#region src/service.d.ts type ServiceOptions = { wellnessCheck?: { operation: (stdio: Stream) => Operation>; timeout?: number; frequency?: number; }; processOptions?: ExecOptions; }; /** * Start a process and return an Operation that represents the running service. * * The Operation returned by useService returns when the process has started and, * if a wellnessCheck is provided, once the wellnessCheck passes. When run in an * effection scope, the operation remains active in that scope. When the operation * goes out of scope, effection will automatically shut down the * process and clean up and shut down the process. */ declare function useService(name: string, cmd: string, options?: ServiceOptions): Operation; //#endregion export { useService };