UNPKG

@cocalc/project

Version:
37 lines (36 loc) 1.2 kB
/// <reference types="node" /> import { EventEmitter } from "events"; import { JupyterKernel } from "./jupyter"; import { CodeExecutionEmitterInterface, ExecOpts, StdinFunction } from "@cocalc/frontend/jupyter/project-interface"; export declare class CodeExecutionEmitter extends EventEmitter implements CodeExecutionEmitterInterface { readonly kernel: JupyterKernel; readonly code: string; readonly id?: string; readonly stdin?: StdinFunction; readonly halt_on_error: boolean; private iopub_done; private shell_done; private state; private all_output; private _message; private _go_cb; private timeout_ms?; private timer?; private killing; constructor(kernel: JupyterKernel, opts: ExecOpts); emit_output(output: object): void; cancel(): void; close(): void; throw_error(err: any): void; _handle_stdin(mesg: any): Promise<void>; _handle_shell(mesg: any): void; private set_shell_done; private set_iopub_done; _handle_iopub(mesg: any): void; private handle_closed; _finish(): void; _push_mesg(mesg: any): void; go(): Promise<object[]>; _go(cb: Function): void; private timeout; }