Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface AsyncActionContext<T>

A context for an async action.

template

T Type of the underlying item.

Type parameters

  • T

Hierarchy

  • AsyncActionContext

Index

Properties

index

index: number

The zero based index.

isFirst

isFirst: boolean

Indicates if this is the first action or not.

item

item: T

The zero based index.

previousValue

previousValue: any

The value from the previous operation.

result

result: any

Gets or sets the result value for the callback.

sequence

sequence: IEnumerable<T>

Gets the underlying sequence.

value

value: any

Gets or sets the value for this action and the upcoming ones.

Methods

cancel

  • cancel(result?: any): void
  • Cancels the whole operation.

    Parameters

    • Optional result: any

    Returns void

reject

  • reject(reason: any, result?: any): void
  • Finishes the action as failed and cancels the whole operation.

    Parameters

    • reason: any

      The reason why the action has failed.

    • Optional result: any

    Returns void

resolve

  • resolve(nextValue?: any): void
  • Finishes the action as succeeded.

    Parameters

    • Optional nextValue: any

    Returns void

Generated using TypeDoc