import { IInputOutput } from './in-out'; export declare class KernelHost { private readonly inout; private readonly opts; private readonly kernel; private readonly eventEmitter; constructor(inout: IInputOutput, opts?: { debug?: boolean; debugTiming?: boolean; noStack?: boolean; validateAssemblies?: boolean; }); run(): void; once(event: 'exit', listener: (code: number) => void): void; private callbackHandler; /** * Processes the input request `req` and writes the output response to * stdout. This method invokes `next` when the request was fully processed. * This either happens synchronously or asynchronously depending on the api * (e.g. the "end" api will wait for an async promise to be fulfilled before * it writes the response) * * @param req The input request * @param next A callback to invoke to continue * @param sync If this is 'true', "next" must be called synchronously. This means * that we won't process any async activity (begin/complete). The kernel * doesn't allow any async operations during a sync callback, so this shouldn't * happen, so we assert in this case to find bugs. */ private processRequest; /** * Writes an "ok" result to stdout. */ private writeOkay; /** * Writes an "error" result to stdout. */ private writeError; /** * Returns true if the value is a promise. */ private isPromise; /** * Given a kernel api name, returns the function to invoke. */ private findApi; private debug; } //# sourceMappingURL=host.d.ts.map