GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — opencode/packages/plugin/src/effect/registration.ts at dev · yusha/opencode Expand file tree/ Copy pathregistration.tsMore file actions 27 lines (22 loc) · 1 KB / Copy pathregistration.tsFile metadata and controls27 lines (22 loc) · 1 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 import type { Effect, Scope } from "effect" export interface Registration { readonly dispose: Effect.Effect<void> } export interface ModelHookOptions { /** Limits the hook to one provider. Unscoped hooks apply to every provider. */ readonly providerID?: string } export type Hooks<Spec, Failures extends Record<keyof Spec, unknown> = Record<keyof Spec, never>> = < Name extends keyof Spec, >( name: Name, callback: (input: Spec[Name]) => Effect.Effect<void, Failures[Name]>, ) => Effect.Effect<Registration, never, Scope.Scope> export type ModelHooks<Spec, Failures extends Record<keyof Spec, unknown> = Record<keyof Spec, never>> = < Name extends keyof Spec, >( name: Name, callback: (input: Spec[Name]) => Effect.Effect<void, Failures[Name]>, options?: Spec[Name] extends { readonly model: unknown } ? ModelHookOptions : never, ) => Effect.Effect<Registration, never, Scope.Scope> export type Transform<Input> = (callback: (input: Input) => void) => Effect.Effect<Registration, never, Scope.Scope> |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |