import { IDetachable } from "./IDetachable"; import { IStringDictionary } from "./IDictionary"; import { IDisposable } from "./IDisposable"; import { PlatformEvent } from "./PlatformEvent"; export interface IEventListener { OnEvent(e: TEvent): void; } export interface IEventSource extends IDisposable { Metadata: IStringDictionary; OnEvent(e: TEvent): void; Attach(onEventCallback: (event: TEvent) => void): IDetachable; AttachListener(listener: IEventListener): IDetachable; }