CommonVariableContainer
Callable
Parameters
defaults: T1
Default values that should be restored upon reset
extraVars: T2 = null
Extra values that should not affected by resets
resetCallbacks: { replacer?: (this, key, value) => any; reviver?: (this, key, value) => any } = null
Extra callbacks for affecting the deep cloning process on reset. Generally only relevant if one of the fields contains non-JSON-serializible data.
optionalreplacer: (this, key, value) => any
optionalreviver: (this, key, value) => any
Returns VariableContainer<T1, T2>
- The newly created object
Construct an object for holding arbitrary (user-specified) values with a mechanism to reset them to a default