import * as Context from "effect/Context";
import type { Aspect } from "./Aspect.ts";
export type ContextPlugin = Context.Service<
`ContextPlugin<${A["type"]}>`,
ContextPluginService
>;
export interface ContextPluginService {
context: (a: A) => string;
}
export const ContextPlugin = (
type: A["type"],
): ContextPlugin =>
Context.Service<`ContextPlugin<${A["type"]}>`, ContextPluginService>(
`ContextPlugin<${type}>`,
);