Skip to Content
API referencePulsar CoreSrcType AliasesPollingFetcherParams<R, T>

@tuwaio/pulsar-core-monorepo


PollingFetcherParams<R, T>

PollingFetcherParams<R, T> = object

Defined in: packages/pulsar-core/src/utils/initializePollingTracker.ts:14 

Defines the parameters for the fetcher function used within the polling tracker. The fetcher is the core logic that performs the actual API call.

Type Parameters

R

R

The expected type of the successful API response.

T

T

The type of the transaction object being tracked.

Properties

onFailure()

onFailure: (response?) => void

Defined in: packages/pulsar-core/src/utils/initializePollingTracker.ts:22 

Callback to be invoked when the fetcher determines the transaction has failed.

Parameters

response?

R

Returns

void


onIntervalTick()?

optional onIntervalTick: (response) => void

Defined in: packages/pulsar-core/src/utils/initializePollingTracker.ts:24 

Optional callback for each successful poll, useful for updating UI with intermediate states.

Parameters

response

R

Returns

void


onReplaced()?

optional onReplaced: (response) => void

Defined in: packages/pulsar-core/src/utils/initializePollingTracker.ts:26 

Optional callback for when a transaction is replaced (e.g., speed-up).

Parameters

response

R

Returns

void


onSuccess()

onSuccess: (response) => void

Defined in: packages/pulsar-core/src/utils/initializePollingTracker.ts:20 

Callback to be invoked when the fetcher determines the transaction has succeeded.

Parameters

response

R

Returns

void


stopPolling()

stopPolling: (options?) => void

Defined in: packages/pulsar-core/src/utils/initializePollingTracker.ts:18 

A callback to stop the polling mechanism, typically called on success or terminal failure.

Parameters

options?
withoutRemoving?

boolean

Returns

void


tx

tx: T

Defined in: packages/pulsar-core/src/utils/initializePollingTracker.ts:16 

The transaction object being tracked.

Last updated on