@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.
68 lines (67 loc) • 1.57 kB
TypeScript
/**
* @module Async
*/
/**
*
* IMPORT_PATH: `"@daiso-tech/core/async"`
* @group Errors
*/
export declare class AsyncError extends Error {
constructor(message: string, cause?: unknown);
}
/**
*
* 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;
};
/**
*
* 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 class HedgingAsyncError extends AsyncError {
readonly errors: unknown[];
constructor(message: string, errors: unknown[]);
}
/**
*
* IMPORT_PATH: `"@daiso-tech/core/async"`
* @group Errors
*/
export declare class CapacityFullAsyncError extends AsyncError {
constructor(message: string, cause?: unknown);
}
/**
*
* IMPORT_PATH: `"@daiso-tech/core/async"`
* @group Errors
*/
export declare const ASYNC_ERRORS: {
readonly Base: typeof AsyncError;
readonly Timeout: typeof TimeoutAsyncError;
readonly Retry: typeof RetryAsyncError;
readonly Hedging: typeof HedgingAsyncError;
readonly CapacityFull: typeof CapacityFullAsyncError;
};