export interface CliffordOptions { debug?: boolean; useBabelNode?: boolean; replacers?: ((chunk: string) => string)[]; } declare class CliffordInstance { private command; private args; /** * The options provided to the clifford instance at its construction. */ private options; /** * The child process pointer. */ private cli; /** * The instance that reads and formats the process' output */ private reader; /** * Flags the underlying process has been closed */ private isDead; constructor(command: string, args: string[], options: CliffordOptions); /** * Type a string to the process. * This will ultimately write the string provided to the process' stdin feed. * * @param string The string to be typed. */ type(string: string): Promise; /** * Read the process' output until its exit event. * * WARNING! This _will_ timeout if your process hangs for any reason, * i.e. if it waits for user input. */ read(): Promise; /** * Returns the next line printed in the screen. * In case there's no line to be read in the screen, wait until a new one has been printed. * * WARNING! This _will_ timeout if your process hands for any reason, * i.e. if it waits for user input. */ readLine(): Promise; /** * Finds a line in the screen and returns it. * It will return the first line it finds, including lines that have already been read. * In case no line in the current screen satisfies the provided matcher, wait until something * that is printed does. * * WARNING! This _will_ timeout if your process hangs for any reason, * i.e. if it waits for user input. * * @param matcher A string or regex we should use to match lines and find a * piece of text in the screen. */ findByText(matcher: string | RegExp): Promise; /** * Waits util a line satisfies the matcher provided. * It won't look at lines that have already been read, so use it only if you're sure that * the line you're looking for is not already flushed to the screen. * * WARNING! This _will_ timeout if your process hands for any reason, * i.e. if it waits for user input.' * * @param matcher A string or regex we should use to match lines and find a * piece of text in the screen. */ waitUntil(matcher: string | RegExp): Promise; /** * Kills the process and waits until its streams are properly closed. * It's advised you wait for this method at the end of tests that don't go through * the process until it self-closes. */ kill(): Promise; /** * Waits until the underlying process has closed. */ untilClose(): Promise; /** * A more readable alternative to the default [object Object] * Will be used in all kinds of stringification, e.g. `potato: ${cliffordInstance}` */ toString(): string; } export default function clifford(command: string, args?: string[], options?: CliffordOptions): CliffordInstance; export {};