UNPKG

@coze/taro-api

Version:

Official Coze Taro SDK for seamless AI integration into your applications | 扣子官方 Taro SDK,助您轻松集成 AI 能力到应用中

11 lines (10 loc) 453 B
import { EventName, type EventHandler, type EventMessage } from './types'; export declare abstract class BaseEventSource { protected events: TaroGeneral.Events; private isClosed; abstract start(): void; abstract abort(): void; on(eventName: EventName, handler: EventHandler): this; off(eventName?: EventName, handler?: EventHandler): this; trigger(eventName: EventName, args?: Pick<EventMessage, 'data' | 'errMsg'>): this; }