import { AstBlock, Token } from './common'; import { BlockContext } from './evaluator/scope'; export type PackageLoader = (packageName: string) => Record; export type ModuleLoader = (filePath: string) => Promise; export declare function jsPython(): Interpreter; export declare class Interpreter { private readonly initialScope; private _lastExecutionContext; private packageLoader?; private moduleLoader?; static create(): Interpreter; get initialExecutionContext(): Record; get lastExecutionContext(): Record | null; cleanUp(): void; jsPythonInfo(): string; tokenize(script: string): Token[]; parse(script: string, moduleName?: string): AstBlock; eval(codeOrAst: string | AstBlock, scope?: Record, entryFunctionName?: string | [string, ...unknown[]], moduleName?: string): unknown; evalAsync(codeOrAst: string | AstBlock, scope?: Record, entryFunctionName?: string | [string, ...unknown[]], moduleName?: string, ctxInitialized?: (ctx: BlockContext) => void): Promise; /** * Compatibility method (with v1). ! */ evaluate(script: string, context?: Record, entryFunctionName?: string | [string, ...unknown[]], moduleName?: string, ctxInitialized?: (ctx: BlockContext) => void): Promise; registerPackagesLoader(loader: PackageLoader): Interpreter; registerModuleLoader(loader: ModuleLoader): Interpreter; addFunction(funcName: string, fn: (...args: unknown[]) => void | unknown | Promise): Interpreter; assignGlobalContext(obj: Record): Interpreter; hasFunction(scripts: string | undefined, funcName: string): boolean; assignImportContext(ast: AstBlock, context: Record): Record; private moduleParser; private packageResolver; } //# sourceMappingURL=interpreter.d.ts.map