UNPKG

@dolittle/sdk.resilience

Version:

Dolittle is a decentralized, distributed, event-driven microservice platform built to harness the power of events.

28 lines 1.02 kB
import { Observable } from 'rxjs'; /** * Represents a possible cancellation. */ export declare class Cancellation extends Observable<void> { private readonly _subject; private _cancelled; /** * Creates a new instance of the {@link Cancellation} class. * @param {Observable<void>} source - The source observable indicates a cancellation has been requested by completing. */ constructor(source: Observable<void>); /** * Gets a value indicating wheter or not the {@link Cancellation} is cancelled. */ get cancelled(): boolean; /** * Default {@link Cancellation}, which is never. */ static default: Cancellation; /** * Creates a new {@link Cancellation} that is cancelled after the specified amount of time. * @param {number} time - The time in milliseconds until the cancellation occurs. * @returns {Cancellation} The scheduled cancellation. */ static after(time: number): Cancellation; } //# sourceMappingURL=Cancellation.d.ts.map