[AAE-30878] - Migrating from event-emitter to eventemitter3 which is ESM and commonJs compatibile

This commit is contained in:
VitoAlbano
2025-08-12 18:33:39 +01:00
committed by Vito Albano
parent c8c1ae7838
commit 02e309b26f
2 changed files with 2 additions and 1 deletions

View File

@@ -155,7 +155,7 @@ export class AdfHttpClient implements JsApiHttpClient {
return this.request<T>(url, { ...options, httpMethod: 'DELETE' }, sc, emitters);
}
private addPromiseListeners<T = any>(promise: Promise<T>, eventEmitter: any) {
private addPromiseListeners<T = any>(promise: Promise<T>, eventEmitter: EventEmitter) {
const eventPromise = Object.assign(promise, {
on<K extends string | symbol>(event: K, fn: (...args: any[]) => void, context?: any) {
eventEmitter.on(event, fn, context);