Interface for components that should clean their state.
Cleaning state most often is used during testing. But there may be situations when it can be done in production.
Cleaner
class MyObjectWithState implements ICleanable { private _state: any = {}; ... public clear(correlationId: string): void { this._state = {}; } }
Clears component state.
(optional) transaction id to trace execution through call chain.
callback function that receives error or null no errors occured.
Generated using TypeDoc
Interface for components that should clean their state.
Cleaning state most often is used during testing. But there may be situations when it can be done in production.
Cleaner
Example
class MyObjectWithState implements ICleanable { private _state: any = {}; ... public clear(correlationId: string): void { this._state = {}; } }