/** * Result Helper Utilities * * Convenience factories for creating ExecResult objects in custom commands. * Eliminates boilerplate when returning success/failure from command handlers. */ import type { ExecResult } from "../types.js"; /** * Create a successful ExecResult (exitCode 0). * * @example * ```ts * return success("Hello, world!\n"); * ``` */ export declare function success(stdout?: string): ExecResult; /** * Create a failed ExecResult with an error message. * * @example * ```ts * return fail("mycommand: file not found\n", 2); * ``` */ export declare function fail(stderr: string, exitCode?: number): ExecResult; /** * Create an ExecResult with explicit stdout, stderr, and exitCode. * * @example * ```ts * return output("partial data\n", "warning: truncated\n", 0); * ``` */ export declare function output(stdout: string, stderr: string, exitCode: number): ExecResult;