import { Backend, RunMode, WorkerDiagnostic } from "../../Backend"; import { BackendEvent } from "../../../communication/BackendEvent"; import { PyodideExtras } from "pyodide-worker-runner"; /** * Implementation of a Python backend for Papyros * Powered by Pyodide (https://pyodide.org/) */ export declare class PythonWorker extends Backend { private pyodide; private papyros; /** * Promise to asynchronously install imports needed by the code */ private installPromise; constructor(); private static convert; /** * @return {any} Function to expose a method with Pyodide support */ protected syncExpose(): any; private static getPyodide; launch(onEvent: (e: BackendEvent) => void): Promise; /** * Helper method to install imports and prevent race conditions with double downloading * @param {string} code The code containing import statements */ private installImports; runModes(code: string): Array; runCode(extras: PyodideExtras, code: string, mode?: string): Promise; lintCode(code: string): Promise>; provideFiles(inlineFiles: Record, hrefFiles: Record): Promise; deleteFile(name: string): Promise; updateFile(name: string, content: string, binary: boolean): Promise; renameFile(oldName: string, newName: string): Promise; }