cloudaxe-opencode/packages/plugin/src/tui/plugin.ts

15 lines
319 B
TypeScript
Raw Normal View History

2026-07-14 03:08:34 +00:00
import type { Context } from "./context.js"
export type { Context }
export type Cleanup = () => Promise<void> | void
export interface Definition {
readonly id: string
readonly setup: (context: Context) => Promise<Cleanup | void> | Cleanup | void
}
export function define(plugin: Definition) {
return plugin
}