CommonVariableContainer
Callable
Type parameters
- T1
- T2 = {}
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: any, key: string, value: any) => any; reviver?: (this: any, key: string, value: any) => 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: any, key: string, value: any) => any
optionalreviver: (this: any, key: string, value: any) => 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