import { api } from '@jsii/kernel'; import { SyncStdio } from './sync-stdio'; export declare type Output = { hello: string; } | { ok: api.KernelResponse; } | { callback: api.Callback; } | { pending: true; } | { error: string; stack?: string; }; export declare type Input = ({ api: string; } & api.KernelRequest) | { complete: api.CompleteRequest; }; export declare type Exit = { exit: number; }; /** * An IO provider for jsii API exchanges. */ export interface IInputOutput { /** * Writes a message to the jsii API host. * @param message the message to be sent. */ write(message: Output): void; /** * Wait for a message from the jsii API host, then return it. * * @returns the received message, or `undefined` if the API host has no more * requests to send. */ read(): Input | Exit | undefined; } export declare class InputOutput implements IInputOutput { private readonly stdio; debug: boolean; constructor(stdio: SyncStdio); write(obj: Output): void; read(): Input | undefined; } //# sourceMappingURL=in-out.d.ts.map