mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
19 lines
465 B
TypeScript
19 lines
465 B
TypeScript
import { Effects } from '../Effects'
|
|
import { PackageId, StatusInfo } from '../osBindings'
|
|
import { Watchable } from './Watchable'
|
|
|
|
export class GetStatus extends Watchable<StatusInfo | null> {
|
|
protected readonly label = 'GetStatus'
|
|
|
|
constructor(
|
|
effects: Effects,
|
|
readonly opts: { packageId?: PackageId } = {},
|
|
) {
|
|
super(effects)
|
|
}
|
|
|
|
protected fetch(callback?: () => void) {
|
|
return this.effects.getStatus({ ...this.opts, callback })
|
|
}
|
|
}
|