UNPKG

@voice-ping/cognitive-services-speech

Version:

VoicePing Cognitive Services Speech SDK for JavaScript forked from Microsoft

14 lines (13 loc) 575 B
import { IDetachable } from "./IDetachable"; import { IStringDictionary } from "./IDictionary"; import { IDisposable } from "./IDisposable"; import { PlatformEvent } from "./PlatformEvent"; export interface IEventListener<TEvent extends PlatformEvent> { onEvent(e: TEvent): void; } export interface IEventSource<TEvent extends PlatformEvent> extends IDisposable { metadata: IStringDictionary<string>; onEvent(e: TEvent): void; attach(onEventCallback: (event: TEvent) => void): IDetachable; attachListener(listener: IEventListener<TEvent>): IDetachable; }