From f60ed5afab696a285e8333b18da0f30677857892 Mon Sep 17 00:00:00 2001 From: Le Vivilet Date: Fri, 27 Dec 2024 13:52:24 +0100 Subject: [PATCH] lint --- .../src/parts/GetFirstEvent/GetFirstEvent.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/preview-process/src/parts/GetFirstEvent/GetFirstEvent.ts b/packages/preview-process/src/parts/GetFirstEvent/GetFirstEvent.ts index 584e1976..763f0eb8 100644 --- a/packages/preview-process/src/parts/GetFirstEvent/GetFirstEvent.ts +++ b/packages/preview-process/src/parts/GetFirstEvent/GetFirstEvent.ts @@ -1,18 +1,18 @@ import type { EventEmitter } from 'node:events' import type { FirstEvent } from '../FirstEvent/FirstEvent.ts' -const addListener = (emitter: EventEmitter, type: string, callback: any) => { +const addListener = (emitter: EventEmitter, type: string, callback: any): void => { emitter.on(type, callback) } -const removeListener = (emitter: EventEmitter, type: string, callback: any) => { +const removeListener = (emitter: EventEmitter, type: string, callback: any): void => { emitter.off(type, callback) } export const getFirstEvent = (eventEmitter: EventEmitter, eventMap: any): Promise => { const { resolve, promise } = Promise.withResolvers() const listenerMap = Object.create(null) - const cleanup = (value: any) => { + const cleanup = (value: any): void => { for (const event of Object.keys(eventMap)) { removeListener(eventEmitter, event, listenerMap[event]) }