convex
Version:
Client for the Convex Cloud
27 lines • 1.04 kB
TypeScript
import { Long } from "../long.js";
import { ClientMessage, MutationRequest, MutationResponse, RequestId } from "./protocol.js";
export declare class RequestManager {
private inflightRequests;
constructor();
request(message: MutationRequest): Promise<any>;
/**
* Update the state after receiving a response.
*
* @returns A RequestId if the request is complete and its optimistic update
* can be dropped, null otherwise. Only applies to mutations.
*/
onResponse(response: MutationResponse): RequestId | null;
removeCompleted(ts: Long): Set<RequestId>;
restart(): ClientMessage[];
/**
** @returns true if there are any requests that have been requested but have
** not be completed yet.
**/
hasIncompleteRequests(): boolean;
/**
** @returns true if there are any inflight requests, including ones that have
** completed on the server, but have not been applied.
**/
hasInflightRequests(): boolean;
}
//# sourceMappingURL=request_manager.d.ts.map