UNPKG

@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.

82 lines 2.23 kB
import { BaseEvent } from "../event-bus/contracts/_shared.js"; /** * This event is dispatched when the `LazyPromise` has been rejected. * * IMPORT_PATH: `"@daiso-tech/core/async"` * @group Events */ export class FailureAsyncEvent extends BaseEvent { } /** * This event is dispatched when the `LazyPromise` has been fulfilled. * * IMPORT_PATH: `"@daiso-tech/core/async"` * @group Events */ export class SuccessAsyncEvent extends BaseEvent { } /** * This event is dispatched when the `LazyPromise` has been fulfilled or rejected. * * IMPORT_PATH: `"@daiso-tech/core/async"` * @group Events */ // eslint-disable-next-line @typescript-eslint/no-empty-object-type export class FinallyAsyncEvent extends BaseEvent { } /** * This event is dispatched on every retry attempt of the `LazyPromise`. * * IMPORT_PATH: `"@daiso-tech/core/async"` * @group Events */ export class RetryAttemptAsyncEvent extends BaseEvent { } /** * This event is dispatched when the rety attempt of the `LazyPromise` has exceeded the given time limit. * * IMPORT_PATH: `"@daiso-tech/core/async"` * @group Events */ export class RetryTimeoutAsyncEvent extends BaseEvent { } /** * This event is dispatched when the `LazyPromise` has failed all retry attempts. * * IMPORT_PATH: `"@daiso-tech/core/async"` * @group Events */ export class RetryFailureAsyncEvent extends BaseEvent { } /** * This event is dispatched when `LazyPromise` has exceeded the given total time limit. * * IMPORT_PATH: `"@daiso-tech/core/async"` * @group Events */ export class TotalTimeoutFailureAsyncEvent extends BaseEvent { } /** * This event is dispatched when `LazyPromise` is aborted. * * IMPORT_PATH: `"@daiso-tech/core/async"` * @group Events */ export class AbortAsyncEvent extends BaseEvent { } /** * * IMPORT_PATH: `"@daiso-tech/core/async"` * @group Events */ export const ASYNC_EVENTS = { Failure: FailureAsyncEvent, Success: SuccessAsyncEvent, Finally: FinallyAsyncEvent, RetryAttempt: RetryAttemptAsyncEvent, RetryTimeout: RetryTimeoutAsyncEvent, RetryFailure: RetryFailureAsyncEvent, TotalTimeoutFailure: TotalTimeoutFailureAsyncEvent, Abort: AbortAsyncEvent, }; //# sourceMappingURL=async.events.js.map