Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface CreateFetchStateMachineProps<T>

Type parameters

  • T

Hierarchy

  • CreateFetchStateMachineProps

Index

Properties

Optional abortSignal

abortSignal: AbortSignal

A function from AbortController to allow a user to abort a request

Optional onAbort

onAbort: () => void

Callback function when the web request is aborted

Type declaration

    • (): void
    • Returns void

onFailure

onFailure: (reason: Error, additionalData?: { response?: Response }) => void

Callback function invoked when the fetch operation fails.

param

The data associated with the failure.

Type declaration

    • (reason: Error, additionalData?: { response?: Response }): void
    • Parameters

      • reason: Error
      • Optional additionalData: { response?: Response }
        • Optional response?: Response

      Returns void

onSuccess

onSuccess: (responseBody: T) => void

Callback function invoked when the fetch operation is successful.

param

The data returned from the fetch operation.

Type declaration

    • (responseBody: T): void
    • Parameters

      • responseBody: T

      Returns void

Generated using TypeDoc