import type { Bytecode } from "./bytecode" import type { Value, TypeScriptFunction } from "./value" import { VM } from "./vm" export async function run(bytecode: Bytecode, functions?: Record): Promise { const vm = new VM(bytecode, functions) return await vm.run() } export { type Bytecode, toBytecode, type ProgramItem } from "./bytecode" export { bytecodeToString } from "./format" export { wrapNative, isWrapped, type ParamInfo, extractParamInfo, getOriginalFunction } from "./function" export { OpCode } from "./opcode" export { Scope } from "./scope" export type { Value, TypeScriptFunction, NativeFunction } from "./value" export { isValue, toValue, toString, toNumber, fromValue, toNull } from "./value" export { VM } from "./vm"