You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
472 B

/**
* Enum of unit statuses.
*/
enum Status {
Stopped = 'stopped',
Starting = 'starting',
Running = 'running',
Stopping = 'stopping',
Error = 'error',
}
/**
* Returns true if the given value is a valid unit status.
* @param something
* @return boolean
*/
const isStatus = (something: any) => [
Status.Stopped,
Status.Starting,
Status.Running,
Status.Stopping,
Status.Error,
].includes(something)
export { Status, isStatus }