plugin.ts 404 B

123456789101112131415
  1. export * as Plugin from "./plugin"
  2. import { Schema } from "effect"
  3. import { define, inventory } from "./event"
  4. export const ID = Schema.String.pipe(Schema.brand("Plugin.ID"))
  5. export type ID = typeof ID.Type
  6. export const PluginID = ID
  7. const Added = define({
  8. type: "plugin.added",
  9. schema: { id: ID },
  10. })
  11. export const Event = { Added, Definitions: inventory(Added) }
  12. export const PluginEvent = Event