import { Expression } from './expressions'; import { CallableExpr } from '../callable'; import { IScope } from '../scope'; import { Type } from '../type'; import { Method } from '../type-member'; /** * Expression Proxy * * Builds a JavaScript object that will mirror the JavaScript operations done to it * in an expression tree. * * This only extends to operations that are: calls, method calls and property lookups. * We can't translate operations like comparisons, additions etc, because JavaScript * has no way to intercept these. * * (It's not necessarily clear that this is a good idea... it may become very unclear * what is actually running code and what is building an AST). */ export declare function $E(exp: Expression): ExpressionProxy; /** * Provides access to the local `this` as an expression proxy. */ export declare const $this: ExpressionProxy; export type ExpressionProxy = E & { (...args: Expression[]): ExpressionProxy; [key: string]: ExpressionProxy; }; export type TypeExpressionProxy = T & { (...args: Expression[]): ExpressionProxy; [key: string]: ExpressionProxy; new (...args: Expression[]): ExpressionProxy; }; /** * Make a proxy for a type */ export declare function $T(type: Type): TypeExpressionProxy; /** * A class representing an expression proxy which builds a JavaScript object that * will mirror the JavaScript operations done to it in an expression tree. */ export declare class CallableProxy implements CallableExpr { /** * Creates a new CallableProxy that can be called with the specified name. */ static fromName(name: string, scope: IScope): CallableProxy; static fromMethod(method: Method): CallableProxy; private readonly expr; private readonly name; private constructor(); /** * Invokes the callable expression with the provided arguments. */ invoke(...args: Expression[]): import("./invoke").InvokeCallable; /** * The name of the expression proxy. */ toString(): string; }