import { FunctionLike } from "./declaration";
import { Err } from "./error";
import { AnyAsyncFunction, AnyFunction } from "./util";
/**
 * A macro (compile-time) function that converts an ArrowFunction or FunctionExpression to a {@link FunctionDecl}.
 *
 * Use this function to quickly grab the {@link FunctionDecl} (AST) representation of TypeScript syntax and
 * then perform interpretations of that representation.
 *
 * Valid uses  include an in-line ArrowFunction or FunctionExpression:
 * ```ts
 * const decl1 = reflect((arg: string) => {})
 * const decl2 = reflect(function (arg: string) {})
 * ```
 *
 * Illegal uses include references to functions or computed functions:
 * ```ts
 * const functionRef = () => {}
 * const decl1 = reflect(functionRef)
 *
 * function computeFunction() {
 *   return () => "hello"
 * }
 * const decl2 = reflect(computeFunction())
 * ```
 *
 * @param func an in-line ArrowFunction or FunctionExpression. It must be in-line and cannot reference
 *             a variable or a computed function/closure.
 */
export declare function reflect<F extends AnyFunction | AnyAsyncFunction>(func: F): FunctionLike<F> | Err | undefined;
export declare const deploymentOnlyModule = true;
export declare const ReflectionSymbolNames: {
    readonly AST: "functionless:AST";
    readonly BoundThis: "functionless:BoundThis";
    readonly BoundArgs: "functionless:BoundArgs";
    readonly Reflect: "functionless:Reflect";
    readonly TargetFunction: "functionless:TargetFunction";
};
export declare const ReflectionSymbols: {
    readonly AST: symbol;
    readonly BoundArgs: symbol;
    readonly BoundThis: symbol;
    readonly Reflect: symbol;
    readonly TargetFunction: symbol;
};
/**
 * Validates and return the {@link FunctionLike} AST of {@link a} if it is:
 * 1. a `function` that has been registered with its AST form
 * 2. already a {@link FunctionLike}
 *
 * @param a any value
 * @param functionLocation string describing the location of this validation (for error message)
 * @returns a {@link FunctionLike}
 * @throws an Error if {@link a} has not been registered or failed to parse
 */
export declare function validateFunctionLike(a: any, functionLocation: string): FunctionLike;
//# sourceMappingURL=reflect.d.ts.map