@daiso-tech/core
Version:
The library offers flexible, framework-agnostic solutions for modern web applications, built on adaptable components that integrate seamlessly with popular frameworks like Next Js.
61 lines (60 loc) • 1.46 kB
TypeScript
/**
* @module Async
*/
/**
*
* IMPORT_PATH: `"@daiso-tech/core/async"`
* @group Errors
*/
export declare class AsyncError extends Error {
constructor(message: string, cause?: unknown);
}
/**
* This error is thrown when the is aborted.
*
* IMPORT_PATH: `"@daiso-tech/core/async"`
* @group Errors
*/
export declare class AbortAsyncError extends AsyncError {
constructor(message: string, cause?: unknown);
}
/**
* This error is thrown when the has exceeded the given time limit.
*
* IMPORT_PATH: `"@daiso-tech/core/async"`
* @group Errors
*/
export declare class TimeoutAsyncError extends AsyncError {
constructor(message: string, cause?: unknown);
}
/**
*
* IMPORT_PATH: `"@daiso-tech/core/async"`
* @group Errors
*/
export type RetryAsyncErrorData = {
errors: unknown[];
maxAttempts: number;
};
/**
* This error is thrown when the has failed all retry attempts.
*
* IMPORT_PATH: `"@daiso-tech/core/async"`
* @group Errors
*/
export declare class RetryAsyncError extends AsyncError {
readonly maxAttempts: number;
readonly errors: unknown[];
constructor(message: string, { errors, maxAttempts }: RetryAsyncErrorData);
}
/**
*
* IMPORT_PATH: `"@daiso-tech/core/async"`
* @group Errors
*/
export declare const ASYNC_ERRORS: {
readonly Base: typeof AsyncError;
readonly Abort: typeof AbortAsyncError;
readonly Timeout: typeof TimeoutAsyncError;
readonly Retry: typeof RetryAsyncError;
};