UNPKG

@ably/cli

Version:

Ably CLI for Pub/Sub, Chat and Spaces

30 lines (29 loc) 1 kB
import { Command, Interfaces } from '@oclif/core'; type PrettyPrintableError = Interfaces.PrettyPrintableError; /** * Base command class that provides interactive-mode-safe error handling. * When running in interactive mode, this class converts process.exit calls * to thrown errors that can be caught and handled gracefully. */ export declare abstract class InteractiveBaseCommand extends Command { /** * Override error to throw instead of exit in interactive mode */ error(input: string | Error, options: { code?: string; exit: false; } & PrettyPrintableError): void; error(input: string | Error, options?: { code?: string; exit?: number; } & PrettyPrintableError): never; /** * Override exit to throw instead of exit in interactive mode */ exit(code?: number): never; /** * Override log to ensure proper output in interactive mode */ log(message?: string, ...args: unknown[]): void; } export {};