@@ -122,7 +122,7 @@ export interface EventHandler {
122122 * })
123123 * }
124124 */
125- export type HttpEventHandler = ( request : HttpRequest , response : HttpResponse ) => void ;
125+ export type HttpEventHandler = ( request : HttpRequest , response : HttpResponse ) => void | Promise < void > ;
126126
127127/**
128128 * HttpRequest is an object used by HttpEventHandler that contains request-specific
@@ -204,7 +204,7 @@ export interface Url {
204204 * })
205205 * }
206206 */
207- export type KafkaEventHandler = ( message : KafkaEventMessage ) => void ;
207+ export type KafkaEventHandler = ( message : KafkaEventMessage ) => void | Promise < void > ;
208208
209209/**
210210 * KafkaEventMessage is an object used by KafkaEventHandler that contains Kafka-specific message data.
@@ -243,7 +243,7 @@ export interface KafkaEventMessage {
243243 * })
244244 * }
245245 */
246- export type LdapEventHandler = ( request : LdapSearchRequest , response : LdapSearchResponse ) => void ;
246+ export type LdapEventHandler = ( request : LdapSearchRequest , response : LdapSearchResponse ) => void | Promise < void > ;
247247
248248/**
249249 * LdapSearchRequest is an object used by LdapEventHandler that contains request-specific data.
@@ -343,7 +343,7 @@ export enum LdapResultStatus {
343343 SizeLimitExceeded = 4 ,
344344}
345345
346- export type SmtpEventHandler = ( record : SmtpEventMessage ) => void ;
346+ export type SmtpEventHandler = ( record : SmtpEventMessage ) => void | Promise < void > ;
347347
348348export interface SmtpEventMessage {
349349 server : string ;
@@ -425,7 +425,7 @@ export interface EventArgs {
425425 * }, {times: 1, runFirstTimeImmediately: false})
426426 * }
427427 */
428- export type ScheduledEventHandler = ( ) => void ;
428+ export type ScheduledEventHandler = ( ) => void | Promise < void > ;
429429
430430export interface ScheduledEventArgs {
431431 /**
0 commit comments