/** * Use a Web Worker to initialize and run pyodide code * without blocking the main thread. */ import { JSONValue } from "@holdenmatt/ts-utils"; import { PyodideInterface } from "pyodide"; declare global { interface Window { pyodide: PyodideInterface; } } export interface PyodideRunner { initialize: (packages?: string[]) => Promise; runPython: (code: string, globals?: Record) => Promise; setOutput: (callback: ((text: string) => void) | null) => void; version: string; }