/** * Shared stream event types for all streaming operations (insights, chat, dashboards). */ /** * Discriminated union of all stream events. */ export type AIStreamEvent = { type: 'progress'; message: string; } | { type: 'text'; content: string; } | { type: 'error'; error: string; details?: unknown; }; /** * Extract specific event type from the union * * @typeParam T - Stream event discriminator to extract */ export type AIStreamEventOfType = Extract; /** * Event listener map for .on() convenience method */ export interface AIStreamEventListeners { progress: (message: string) => void; text: (content: string) => void; error: (error: string, details?: unknown) => void; } //# sourceMappingURL=stream.types.d.ts.map