TransferState
Class
A key value store that is transferred from the application on the server side to the application on the client side.
API
Description
class TransferState {}
get
T
Get the value corresponding to a key. Return defaultValue
if key is not found.
@paramdefaultValue
T
@returns
T
set
void
remove
void
hasKey
boolean
isEmpty
boolean
Indicates whether the state is empty.
onSerialize
void
Register a callback to provide the value for a key when toJson
is called.
@paramcallback
() => T
@returns
void
toJson
string
Serialize the current state of the store to JSON.
@returns
string
Jump to details