Optional
This function clones the current state object by serializing and deserializing it.
The clone function takes an optional object parameter
clone
The clone method is returning a new instance of the State class
State
It returns an object with the properties ref, name, status, and value.
value: true
An object with the ref, name, status, and value properties.
Static
It returns a new instance of the State class, with the ref and options parameters passed to the constructor
The name of the state.
options
A new instance of the State class.
It takes a State object and returns a new State object with the same properties
The data to be deserialized.
Generated using TypeDoc
This function clones the current state object by serializing and deserializing it.