// deno-lint-ignore-file no-explicit-any import type { VariantTag } from "@fabric/core"; import type { UUID } from "../../core/types/uuid.ts"; /** * An event is a tagged variant with a payload and a timestamp. */ export interface Event { readonly [VariantTag]: TTag; readonly id: UUID; readonly streamId: UUID; readonly payload: TPayload; } export type EventFromKey< TEvents extends Event, TKey extends TEvents[VariantTag], > = Extract;