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.

20 lines
473 B

import { STATUS_STOPPED, isStatus } from '../const/status.ts'
export default abstract class LifecycleUnit {
private _status = STATUS_STOPPED
public get status() {
return this._status
}
public set status(status) {
if ( !isStatus(status) )
throw new TypeError('Invalid unit status: '+status.description)
this._status = status
}
public async up(): Promise<void> {};
public async down(): Promise<void> {};
}