import { HttpStatusCode } from '@angular/common/http'; import { ErrorPredicate } from '../types'; /** * Range options for the `statusCodes` predicate. */ export type StatusCodeRange = { /** The minimum status code to match */ min?: number; /** The maximum status code to match */ max?: number; }; type InternalStatusCodesErrorPredicateOptions = Set | StatusCodeRange; /** * Options for the `statusCodes` predicate. */ export type StatusCodesErrorPredicateOptions = InternalStatusCodesErrorPredicateOptions | number | number[]; /** * Set of status codes that are generally safe to retry by default. */ export declare const STANDARD_RETRYABLE_STATUS_CODES: HttpStatusCode[]; /** * Match any error with a status code matching the given options. * @param codes The status code(s) to match. * * @example * createHttpRetryInterceptorFn({ * ... * shouldHandleError: withStatusCodes(500), * }) * * @example * createHttpRetryInterceptorFn({ * ... * shouldHandleError: withStatusCodes(500), * ... * }) * * @example * createHttpRetryInterceptorFn({ * ... * shouldHandleError: withStatusCodes([500, 501]), * ... * }) * * @example * createHttpRetryInterceptorFn({ * ... * shouldHandleError: withStatusCodes({ min: 500, max: 599 }), * ... * }) */ export declare function withStatusCodes(codes: StatusCodesErrorPredicateOptions): ErrorPredicate; export {};