UNPKG

youtube-chat

Version:

[![npm version](https://badge.fury.io/js/youtube-chat.svg)](https://badge.fury.io/js/youtube-chat) ![npm](https://img.shields.io/npm/dt/youtube-chat) ![NPM](https://img.shields.io/npm/l/youtube-chat) [![CI](https://github.com/LinaTsukusu/youtube-chat/acti

21 lines (20 loc) 621 B
import TypedEmitter from "typed-emitter"; import { ChatItem, 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<LiveChatEvents>; /** * YouTubeライブチャット取得イベント */ export declare class LiveChat extends LiveChat_base { #private; liveId?: string; constructor(id: YoutubeId, interval?: number); start(): Promise<boolean>; stop(reason?: string): void; } export {};