# Delayedactions
Organize actions that will be fired with delay.

## Parts
    .
    |-- epom-ng2-delayedactions
    |   |-- index

## Service public methods
| Method Declaration                                  | Description |
| --------------------------------------------------- | -- |
| **addAction**(callback: Function, time: number \| null, blocker?: boolean): number | add Action to list and returns number hash. Call `callback` function after `time`.|
|**rejectAction**(hash: number \| Array<number>): void | removes number or numbers from delay list without calling `callback` function|
|**forceActions**(hash: number \| Array<number>): void | calls `callback` function even earlier that `time` has passed |
|**countActionsInProcess**(): |  |

Examples:
```javascript
//reject
    const hashNever = this.delayedActions.addAction(() => alert('never calls'), 1500);
    this.delayedActions.rejectAction(hash);
//force
    const hashForce = this.delayedActions.addAction(() => alert('calls earlier then after 1500ms'), 1500);
    this.delayedActions.forceAction(hash);
//default behaviour
    this.delayedActions.addAction(() => alert('after 1500ms'), 1500);
```
