Cancelable Namespace

    Package: @esfx/cancelable

    Functions

    getReason(cancelable)

    Gets the reason for cancelation.

    Declaration
    function getReason(cancelable: Cancelable | null | undefined): unknown;
    Parameters
    cancelable
    Cancelable | null | undefined

    Returns
    unknown

    hasInstance(value)

    Determines whether a value is a Cancelable object.

    Declaration
    function hasInstance(value: unknown): value is Cancelable;
    Parameters
    value
    unknown

    Returns
    value is Cancelable

    isSignaled(cancelable)

    Determines whether cancelable is in the signaled state.

    Declaration
    function isSignaled(cancelable: Cancelable | null | undefined): boolean;
    Parameters
    cancelable
    Cancelable | null | undefined

    Returns
    boolean

    subscribe(cancelable, onSignaled)

    Subscribes to be notified when a cancelable becomes signaled.

    Declaration
    function subscribe(cancelable: Cancelable | null | undefined, onSignaled: () => void): CancelSubscription;
    Parameters
    cancelable
    Cancelable | null | undefined

    onSignaled
    () => void

    Returns
    CancelSubscription

    throwIfSignaled(cancelable)

    Throws a CancelError exception if the provided cancelable is in the signaled state.

    Declaration
    function throwIfSignaled(cancelable: Cancelable | null | undefined): void;
    Parameters
    cancelable
    Cancelable | null | undefined

    Returns
    void

    Variables

    canceled

    A Cancelable that is already signaled.

    Declaration
    canceled: CancelableCancelSignal

    cancelSignal

    A well-known symbol used to define a method to retrieve the CancelSignal for an object.

    Declaration
    cancelSignal: unique symbol

    name

    Declaration
    name = "Cancelable"

    none

    A Cancelable that can never be signaled.

    Declaration
    none: CancelableCancelSignal
    Generated by DocFX