Hosanna UI API v1.30.2-next
    Preparing search index...

    Class HsCancellationToken

    Class representing a cancellation token for managing asynchronous operations.

    Implements

    Index

    Constructors

    Properties

    isCancelled: boolean = false

    Indicates whether the operation has been cancelled.

    onCancel?: () => void

    Callback function to execute when the operation is cancelled.

    Methods

    • Cancels the operation and optionally resets the token after cancellation.

      Parameters

      • resetAfterCancel: boolean = false

        Whether to reset the token after cancellation.

      Returns void

    • Checks if a cancellation has been requested.

      Returns boolean

      True if cancellation is requested, false otherwise.

    • Resets the cancellation token to its initial state.

      Returns void