UNPKG

589 BTypeScriptView Raw
1import type { EmitterWebhookEvent, EmitterWebhookEventName, State, WebhookEventHandlerError } from "../types.js";
2export declare function receiverOn(state: State, webhookNameOrNames: EmitterWebhookEventName | EmitterWebhookEventName[], handler: Function): void;
3export declare function receiverOnAny<TTransformed>(state: State, handler: (event: TTransformed extends unknown ? EmitterWebhookEvent : EmitterWebhookEvent & TTransformed) => any): void;
4export declare function receiverOnError<TTransformed>(state: State, handler: (event: WebhookEventHandlerError<TTransformed>) => any): void;