import { EventObject, EventPayloadMap, StoreContext, StoreExtension } from "./types.js"; import { storeValidationErrorSymbol } from "./validationError.js"; type ValidationReason = 'invalidContext' | 'invalidEvent' | 'invalidEmitted' | 'unknownEvent' | 'unknownEmitted' | 'asyncValidationUnsupported'; interface StoreValidationErrorOptions { reason: ValidationReason; eventType?: string; context?: unknown; payload?: unknown; issues?: unknown; } /** Error thrown by `validateSchemas()` when schema validation fails. */ export declare class StoreValidationError extends Error { readonly [storeValidationErrorSymbol] = true; readonly reason: ValidationReason; readonly eventType?: string; readonly context?: unknown; readonly payload?: unknown; readonly issues?: unknown; constructor(options: StoreValidationErrorOptions); } interface ValidateSchemasOptions { context?: boolean; events?: boolean; emitted?: boolean; unknownEvents?: 'throw' | 'ignore'; unknownEmitted?: 'throw' | 'ignore'; } /** * Validates schema-declared events, emitted events, and context at runtime. * * Validation is opt-in; stores with schemas only use those schemas for typing * and metadata unless this extension is applied. */ export declare function validateSchemas(options?: ValidateSchemasOptions): StoreExtension; export {};