Files
anomalyco_opencode/packages/plugin/src/promise/registration.ts
T
2026-07-26 20:16:58 -04:00

11 lines
318 B
TypeScript

export interface Registration {
readonly dispose: () => Promise<void>
}
export type Hooks<Spec> = <Name extends keyof Spec>(
name: Name,
callback: (input: Spec[Name]) => Promise<void> | void,
) => Promise<Registration>
export type Transform<Input> = (callback: (input: Input) => void) => Promise<Registration>