/** * 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 }