mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-24 04:01:10 -04:00
18 lines
495 B
TypeScript
18 lines
495 B
TypeScript
import type { Accessor } from "solid-js"
|
|
|
|
export type UpdaterState =
|
|
| { status: "disabled" }
|
|
| { status: "idle" }
|
|
| { status: "checking" }
|
|
| { status: "downloading"; version: string; percent?: number }
|
|
| { status: "ready"; version: string }
|
|
| { status: "up-to-date" }
|
|
| { status: "installing"; version: string }
|
|
| { status: "error"; message: string }
|
|
|
|
export type UpdaterPlatform = {
|
|
state: Accessor<UpdaterState>
|
|
check(): Promise<UpdaterState>
|
|
install(): Promise<void>
|
|
}
|