getManagerStatusText
The getManagerStatusText function returns a string describing the current status of the Manager.
getManagerStatusText(status: ManagerStatus): string| Type | Description | |
|---|---|---|
status | ManagerStatus | The status of the |
| returns | string | A string describing the status. |
It is designed to be used for logging and diagnostic reasons with the status parameter of StatusListener or the return value of the getStatus method.
Example
This example gets text describing the current status of the Manager.
import {createManager, getManagerStatusText} from 'tinytick';
const manager = createManager();
console.log(getManagerStatusText(manager.getStatus()));
// -> 'stopped'
manager.start();
console.log(getManagerStatusText(manager.getStatus()));
// -> 'running'
manager.stop();
console.log(getManagerStatusText(manager.getStatus()));
// -> 'stopping'
Since
v1.2.6