Tracker

class Tracker(defaultTransaction: String, debounceTimeout: Long)

tracks running transactions (e.g. inside a Store)

Parameters

debounceTimeout

denounces values in the Flow of running transaction by this value

defaultTransaction

default transactions text (used if not specified when track is called)

Constructors

Tracker
Link copied to clipboard
js
fun Tracker(defaultTransaction: String, debounceTimeout: Long)
default transactions text (used if not specified when track is called)

Functions

equals
Link copied to clipboard
js
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
js
open fun hashCode(): Int
invoke
Link copied to clipboard
js
operator fun invoke(transaction: String): Flow<Boolean>
Gives a Flow to check, if a certain transaction is running
toString
Link copied to clipboard
js
open fun toString(): String
track
Link copied to clipboard
js
suspend fun <T> track(transaction: String = defaultTransaction, operation: suspend () -> T): T
Tracks a given operation.

Properties

current
Link copied to clipboard
js
val current: String?
Represents the current transaction which is running or null.
data
Link copied to clipboard
js
val data: Flow<Boolean>
Gives a Flow to check if a transaction is running.