import TypedEmitter from "typed-emitter"; import { ChatItem, ChatType, YoutubeId } from "./types/data"; type LiveChatEvents = { start: (liveId: string) => void; end: (reason?: string) => void; chat: (chatItem: ChatItem) => void; error: (err: Error | unknown) => void; }; declare const LiveChat_base: new () => TypedEmitter; /** * YouTubeライブチャット取得イベント */ export declare class LiveChat extends LiveChat_base { #private; liveId?: string; /** * @param id channelId, liveId, or handle of the stream to follow. * @param interval Minimum milliseconds between polls. This is a *floor*: YouTube states how often * it wants to be polled (typically every 10s) and we honour whichever is slower. Upstream * treated this value as a fixed rate and so polled ~10x faster than YouTube asks for, which is * the quickest way to get an IP rate-limited. * @param chatType `"top"` (default) reads YouTube's filtered "Top chat"; `"live"` reads every * message ("Live chat"). Default is `"top"` to match YouTube's own default and keep existing * consumers' behavior unchanged. */ constructor(id: YoutubeId, interval?: number, chatType?: ChatType); start(): Promise; stop(reason?: string): void; } export {};