From a3ca0012c6d8149bb07346f84270deb64916963a Mon Sep 17 00:00:00 2001 From: Frederic Reisenhauer Date: Fri, 22 Nov 2024 16:16:37 +0100 Subject: [PATCH] fix linter of separate webhook handler example --- .../mitthooks/src/examples/separateWebhookHandler.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/mitthooks/src/examples/separateWebhookHandler.ts b/packages/mitthooks/src/examples/separateWebhookHandler.ts index 77c25d4..42b6492 100644 --- a/packages/mitthooks/src/examples/separateWebhookHandler.ts +++ b/packages/mitthooks/src/examples/separateWebhookHandler.ts @@ -52,19 +52,22 @@ function createCustomSeparateWebhookHandler( .build(); } +// eslint-disable-next-line @typescript-eslint/no-unused-vars,no-unused-vars function createCustomSeparateWebhookHandlerWithHandlerForAdded( extensionStorage: ExtensionStorage, extensionId: string, ): SeparateWebhookHandlers { const handlers = new SeparateWebhookHandlerFactory(extensionStorage, extensionId).build(); - handlers.ExtensionAddedToContext = WebhookHandlerChain + const extendedChain = WebhookHandlerChain .fromHandlerFunctions( handlers.ExtensionAddedToContext, - async (webhookContent) => { + () => { console.log("This is only gonna be called for ExtensionAddedToContext"); }, - ).handleWebhook; + ) + + handlers.ExtensionAddedToContext = extendedChain.handleWebhook.bind(extendedChain); return handlers; }