mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-07 15:03:21 +00:00
14 lines
319 B
TypeScript
14 lines
319 B
TypeScript
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
|
|
}
|