Interface that allows you to create components with a method to clean their states.
Description
The ICleanable interface allows you to create components with a method to clean their states.
Instance methods
clear
Clears a component’s state.
clear(context: IContext): Promise<void>
- context: IContext - (optional) execution context to trace execution through call chain.
Examples
class MyObjectWithState implements ICleanable {
    private _state: any = {};
    ...
    public async clear(context: IContext): Promise<void> {
        this._state = {};
    }
}