import type { Route, RouteTable } from "./predecessor-route-table.ts";
import type { RpcResponse } from "./rpc-types.ts";
/** Answered to a command whose switch has not finished within the close grace window: retry it. */
export declare const SWITCH_PENDING = "generation_switch_pending";
export type SwitchOutcome = {
    readonly kind: "switched";
} | {
    readonly kind: "pending";
} | {
    readonly kind: "failed";
    readonly code: string;
};
export declare function switchRoute(table: RouteTable, route: Route): void;
export declare function awaitSwitch(table: RouteTable, route: Route): Promise<SwitchOutcome>;
export declare function afterSwitch(table: RouteTable, route: Route, command: {
    readonly id?: string;
    readonly type: string;
}, local: () => Promise<RpcResponse | undefined>): Promise<RpcResponse | undefined>;
//# sourceMappingURL=predecessor-switch.d.ts.map