UNPKG

@voice-ping/cognitive-services-speech

Version:

VoicePing Cognitive Services Speech SDK for JavaScript forked from Microsoft

17 lines (16 loc) 731 B
import { IDetachable } from "./IDetachable"; import { IStringDictionary } from "./IDictionary"; import { IEventListener, IEventSource } from "./IEventSource"; import { PlatformEvent } from "./PlatformEvent"; export declare class EventSource<TEvent extends PlatformEvent> implements IEventSource<TEvent> { private privEventListeners; private privMetadata; private privIsDisposed; constructor(metadata?: IStringDictionary<string>); onEvent: (event: TEvent) => void; attach: (onEventCallback: (event: TEvent) => void) => IDetachable; attachListener: (listener: IEventListener<TEvent>) => IDetachable; isDisposed: () => boolean; dispose: () => void; get metadata(): IStringDictionary<string>; }