import { NamedEvent } from './base'; export type BaseChannelEvent = NamedEvent & { channelName: string; channelId: string; }; export type ChannelConnectedEvent = BaseChannelEvent & { type: 'connected'; }; export type ChannelDisconnectedEvent = BaseChannelEvent & { type: 'disconnected'; }; export type ChannelEvent = { topic: 'channel'; } & (ChannelConnectedEvent | ChannelDisconnectedEvent); export type ChannelEventType = ChannelEvent['type'];