import { ErrorKind } from '../../../zero-protocol/src/error-kind.ts';
import { type BackoffBody, type ErrorBody } from '../../../zero-protocol/src/error.ts';
/**
 * Represents an error sent by server as part of Zero protocol.
 */
export declare class ServerError<K extends ErrorKind = ErrorKind> extends Error {
    readonly name = "ServerError";
    readonly errorBody: ErrorBody;
    get kind(): K;
    constructor(errorBody: ErrorBody);
}
export declare function isServerError(ex: unknown): ex is ServerError;
export declare function isAuthError(ex: unknown): ex is ServerError<ErrorKind.AuthInvalidated> | ServerError<ErrorKind.Unauthorized>;
export declare function isBackoffError(ex: unknown): BackoffBody | undefined;
//# sourceMappingURL=server-error.d.ts.map