Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface PollOperation<TState, TResult>

Package version

PollOperation is an interface that defines how to update the local reference of the state of the remote long running operation, just as well as how to request the cancellation of the same operation.

It also has a method to serialize the operation so that it can be stored and resumed at any time.

Type parameters

  • TState

  • TResult

Hierarchy

  • PollOperation

Implemented by

Index

Properties

Methods

Properties

state

state: TState

The state of the operation. It will be used to store the basic properties of PollOperationState, plus any custom property that the implementation may require.

Methods

cancel

  • cancel(options?: undefined | { abortSignal?: AbortSignalLike }): Promise<PollOperation<TState, TResult>>
  • Attempts to cancel the underlying operation.

    It only optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike.

    It returns a promise that should be resolved with an updated version of the poller's operation.

    Parameters

    • Optional options: undefined | { abortSignal?: AbortSignalLike }

      Optional properties passed to the operation's update method.

    Returns Promise<PollOperation<TState, TResult>>

toString

  • toString(): string
  • Serializes the operation. Useful when wanting to create a poller that monitors an existing operation.

    Returns string

update

  • update(options?: undefined | { abortSignal?: AbortSignalLike; fireProgress?: undefined | ((state: TState) => void) }): Promise<PollOperation<TState, TResult>>
  • Defines how to request the remote service for updates on the status of the long running operation.

    It optionally receives an object with an abortSignal property, from @azure/abort-controller's AbortSignalLike. Also optionally receives a "fireProgress" function, which, if called, is responsible for triggering the poller's onProgress callbacks.

    Parameters

    • Optional options: undefined | { abortSignal?: AbortSignalLike; fireProgress?: undefined | ((state: TState) => void) }

      Optional properties passed to the operation's update method.

    Returns Promise<PollOperation<TState, TResult>>

Generated using TypeDoc