UNPKG

@arcware-cloud/pixelstreaming-websdk

Version:

WebSDK for easy implementation of pixel streaming with Arcware Cloud Services. Heavily based on the '@epicgames-ps' library.

12 lines (11 loc) 661 B
/** A helper class to spread the event to additional event handlers added from external sources. */ export declare class EventHandler<Type> { private callbacks; /** Returns the added callback on success or null, if something went wrong. */ add<Callback extends (arg: Type) => void>(callback: Callback): Callback | null; /** Returns true if the input callback has been found and removed and false if not. */ remove<Callback extends (arg: Type) => void>(callback: Callback): boolean; constructor(); /** Emits the event-data for each of the existing handlers. */ static Emit<Type>(handler: EventHandler<Type>, event: Type): void; }