UNPKG

@uploadcare/blocks

Version:

Building blocks for Uploadcare products integration

42 lines 1.19 kB
export type EVENT_TYPES = string; export namespace EVENT_TYPES { const UPLOAD_START: string; const REMOVE: string; const UPLOAD_PROGRESS: string; const UPLOAD_FINISH: string; const UPLOAD_ERROR: string; const VALIDATION_ERROR: string; const CDN_MODIFICATION: string; const DATA_OUTPUT: string; } export class EventData { /** * @param {Object} src * @param {EVENT_TYPES} src.type * @param {String} src.ctx * @param {any} src.data */ constructor(src: { type: EVENT_TYPES; ctx: string; data: any; }); /** @type {String} */ ctx: string; /** @type {EVENT_TYPES} */ type: EVENT_TYPES; data: any; } export class EventManager { /** @param {EVENT_TYPES} type */ static eName(type: EVENT_TYPES): string; /** @private */ private static _timeoutStore; /** * @param {EventData} eData * @param {import('./UploaderBlock.js').UploaderBlock | Window} [el] * @param {Boolean} [debounce] */ static emit(eData: EventData, el?: import('./UploaderBlock.js').UploaderBlock | Window, debounce?: boolean): void; } //# sourceMappingURL=EventManager.d.ts.map