import { AmplifyErrorParams } from '@aws-amplify/core/internals/utils'; import { RestApiError } from './RestApiError'; /** * Internal-only class for CanceledError. * * @internal */ export declare class CanceledError extends RestApiError { constructor(params?: Partial); } /** * Check if an error is caused by user calling `cancel()` in REST API. * * @note This function works **ONLY** for errors thrown by REST API. For GraphQL APIs, use `client.isCancelError(error)` * instead. `client` is generated from `generateClient()` API from `aws-amplify/api`. * * @param {unknown} error The unknown exception to be checked. * @returns - A boolean indicating if the error was from an upload cancellation */ export declare const isCancelError: (error: unknown) => error is CanceledError;