feat(plugin): add v2 effect host (#33111)
This commit is contained in:
parent
7a9337da8a
commit
c780d7cee7
139 changed files with 3740 additions and 1943 deletions
11
packages/plugin/src/v2/effect/plugin.ts
Normal file
11
packages/plugin/src/v2/effect/plugin.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import type { Effect, Scope } from "effect"
|
||||
import type { PluginHost } from "./host.js"
|
||||
|
||||
export interface Plugin<R = never> {
|
||||
readonly id: string
|
||||
readonly effect: (host: PluginHost) => Effect.Effect<void, never, R | Scope.Scope>
|
||||
}
|
||||
|
||||
export function define<R>(plugin: Plugin<R>) {
|
||||
return plugin
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue