CancelSource Interface

    Package: @esfx/canceltoken

    Signals a CancelToken when cancellation has been requested.

    Declaration
    export interface CancelSource extends CancelableSource, Disposable 
    Inheritance
    Cancelable
    CancelableSource
    Disposable
    CancelSource
    Inherited Members
    [CancelableSource.cancel](reason)
    [Cancelable.cancelSignal]()
    [Disposable.dispose]()

    Properties

    token

    Gets the CancelToken linked to this source.

    Declaration
    readonly token: CancelToken;
    Property Value
    CancelToken

    Methods

    cancel(reason)

    Cancels the source, evaluating any subscribed callbacks. If any callback raises an exception, the exception is propagated to a host specific unhandled exception mechanism.

    Declaration
    cancel(reason?: unknown): void;
    Parameters
    reason
    unknown

    Returns
    void

    close()

    Closes the source, preventing the possibility of future cancellation.

    Declaration
    close(): void;
    Returns
    void

    Generated by DocFX