UNPKG

@coze/uniapp-api

Version:

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

12 lines (11 loc) 476 B
import { Events } from '../types'; import { EventName, type EventHandler, type EventMessage } from './types'; export declare abstract class BaseEventSource { protected events: 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; }