import { ICodeResource } from '@cloudbase/cals';
export interface IEvaledModule extends ICodeResource {
    exports: any;
}
export interface WidgetsContext {
    _parentId: string;
    _childrenId: string[];
    _visible: boolean;
    parent: WidgetsContext;
    children: WidgetsContext[];
    [key: string]: any;
}
/**
 * The eval result of lowcode
 */
export interface LowcodeContext {
    state: any;
    /**
     * functions defined as getters
     */
    computed: any;
    /**
     * The raw computed functions
     */
    computedFuncs: {
        [page: string]: {
            [fnName: string]: () => any;
        };
    };
    lifeCycle: any;
    common: any;
    handler: any;
    widgets: Record<string, any>;
    node: Record<string, any>;
    this: any;
    props: any;
}
/**
 * Each type of module has parser
 */
export interface LowCodeModuleParser {
    /**
     * called when parse begin
     * @param context The context to share data across parsers
     */
    onStart(context: LowcodeContext): any;
    parseModule(pageId: string, mod: IEvaledModule): void;
    onEnd(context: LowcodeContext): any;
}
export declare function evalCodeCodules(modulesByScope: {
    [pageId: string]: ICodeResource[];
}, opts: {
    dependencies: any;
    onCodeError?: (e: Error, file: string) => void;
    onDependencyMiss?: (name: string, version: string) => void;
    runtimeWindow: any;
    disableAutoCancelPrev?: boolean;
}): Promise<{
    [scope: string]: IEvaledModule[];
}>;
