/** * Describes an ignore error function */ export declare type IgnoreError = (err: Error) => boolean; /** * Wrap a promise and provide a function to decide whether to ignore a type of error * * @template T expected promise return type * @param {Promise} promise a promise to await * @param {IgnoreError} ignore method that returns true if an error should be ignored * @returns {Promise} a promise that resolves to `T` or `null` after ignoring any matched errors */ export declare function ignoreError(promise: Promise, ignore: IgnoreError): Promise; /** * Ignore RestErrors that match a set of status codes. * * @param {number[]} codes HTTP status codes that should not be considered errors * @returns {IgnoreError} a function that accepts an error and returns true if it represents one of the ignored status codes */ export declare function isStatusCodeError(...codes: number[]): IgnoreError; //# sourceMappingURL=ignoreError.d.ts.map