import { $$deepDepSkip } from "../constants.ts";
import type { ExecutionDetails, GrafastResultsList, Maybe, UnbatchedExecutionExtra } from "../interfaces.ts";
import { Step } from "../step.ts";
import type { StepRepresentingList } from "./connection.ts";
declare function unbatchedExecute(_extra: UnbatchedExecutionExtra, list: any[]): any;
export declare class LastStep<TData> extends Step<Maybe<TData>> {
    static $$export: {
        moduleName: string;
        exportName: string;
    };
    allowMultipleOptimizations: boolean;
    unbatchedExecute?: typeof unbatchedExecute;
    constructor(parentPlan: StepRepresentingList<TData>, isArray?: boolean);
    [$$deepDepSkip](): Step;
    execute({ indexMap, values: [values0], }: ExecutionDetails<[ReadonlyArray<TData>]>): GrafastResultsList<TData>;
    deduplicate(peers: LastStep<TData>[]): LastStep<TData>[];
    optimize(): any;
}
/**
 * A plan that resolves to the last entry in the list returned by the given
 * plan.
 *
 * @param plan - the list plan
 * @param array - set this true if the plan represents an array (or
 * null/undefined) - i.e. it' won't be an (async) iterable - to enable greater
 * optimization
 */
export declare function last<TData>(plan: StepRepresentingList<TData>, array?: boolean): LastStep<TData>;
export {};
//# sourceMappingURL=last.d.ts.map