import { AnyFunction } from "@functionless/ast";
import { CodeWithSourceMap } from "source-map";
export interface SerializeClosureProps {
    /**
     * A function to prevent serialization of certain values captured during the serialization.
     */
    serialize?: (o: any) => boolean | any;
    /**
     * A function to prevent serialization of a {@link property} on an {@link obj}
     *
     * @param obj the object containing the property
     * @param property the value of the property name
     */
    shouldCaptureProp?: (obj: any, property: string | number | symbol) => boolean;
    /**
     * If this is a function which, when invoked, will produce the actual entrypoint function.
     * Useful for when serializing a function that has high startup cost that only wants to be
     * run once. The signature of this function should be:  () => (provider_handler_args...) => provider_result
     *
     * This will then be emitted as: `exports.[exportName] = serialized_func_name();`
     *
     * In other words, the function will be invoked (once) and the resulting inner function will
     * be what is exported.
     */
    isFactoryFunction?: boolean;
}
/**
 * Serialize a {@link CodeWithSourceMap} to a JavaScript string with the source map
 * as a base64-encoded comment at the end of the file.
 *
 * @param code the code and source map
 * @returns a a JavaScript string with the source map as a base64-encoded comment at the end of the file.
 */
export declare function serializeCodeWithSourceMap(code: CodeWithSourceMap): string;
/**
 * Serialize a closure to a bundle that can be remotely executed.
 * @param func
 * @param options ES Build options.
 * @returns a string
 */
export declare function serializeClosure(func: AnyFunction, options?: SerializeClosureProps): CodeWithSourceMap;
//# sourceMappingURL=serialize.d.ts.map