import { Scope } from './scope'; import { Node } from '../node'; export declare type VNull = { type: 'null'; }; export declare type VBool = { type: 'bool'; value: boolean; }; export declare type VNum = { type: 'num'; value: number; }; export declare type VStr = { type: 'str'; value: string; }; export declare type VArr = { type: 'arr'; value: Value[]; }; export declare type VObj = { type: 'obj'; value: Map; }; export declare type VFn = { type: 'fn'; args?: string[]; statements?: Node[]; native?: (args: Value[], opts: { call: (fn: VFn, args: Value[]) => Promise; registerAbortHandler: (handler: Function) => void; unregisterAbortHandler: (handler: Function) => void; }) => Value | Promise | void; scope?: Scope; }; export declare type VReturn = { type: 'return'; value: Value; }; export declare type Value = VNull | VBool | VNum | VStr | VArr | VObj | VFn | VReturn; export declare const NULL: { type: "null"; }; export declare const TRUE: { type: "bool"; value: boolean; }; export declare const FALSE: { type: "bool"; value: boolean; }; export declare const NUM: (num: number) => { type: "num"; value: number; }; export declare const STR: (str: string) => { type: "str"; value: string; }; export declare const BOOL: (bool: boolean) => { type: "bool"; value: boolean; }; export declare const OBJ: (obj: Map) => { type: "obj"; value: Map; }; export declare const ARR: (arr: Value[]) => { type: "arr"; value: Value[]; }; export declare const FN: (args: string[] | undefined, statements: Node[] | undefined, scope: Scope | undefined) => { type: "fn"; args: string[] | undefined; statements: Node[] | undefined; scope: Scope | undefined; }; export declare const FN_NATIVE: (fn: ((args: Value[], opts: { call: (fn: VFn, args: Value[]) => Promise; registerAbortHandler: (handler: Function) => void; unregisterAbortHandler: (handler: Function) => void; }) => void | VNull | VBool | VNum | VStr | VArr | VObj | VFn | VReturn | Promise) | undefined) => { type: "fn"; native: ((args: Value[], opts: { call: (fn: VFn, args: Value[]) => Promise; registerAbortHandler: (handler: Function) => void; unregisterAbortHandler: (handler: Function) => void; }) => void | VNull | VBool | VNum | VStr | VArr | VObj | VFn | VReturn | Promise) | undefined; }; export declare const RETURN: (v: Value) => { type: "return"; value: Value; }; export declare const unWrapRet: (v: Value) => Value;