From afe2d0db66df69a86235a7e04eac6a2fb5ff02ad Mon Sep 17 00:00:00 2001 From: EnixCoda Date: Thu, 28 Apr 2022 23:02:46 +0800 Subject: [PATCH] chore: fix an `any` --- src/analytics.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/analytics.ts b/src/analytics.ts index 053aced..2d9a6cb 100644 --- a/src/analytics.ts +++ b/src/analytics.ts @@ -58,13 +58,13 @@ Sentry.init(sentryOptions) export const withErrorLog: Middleware = function withErrorLog(method, args) { return [ - async function () { + async function (...args) { try { - await method.apply(null, arguments as any) + await method(...args) } catch (error) { if (error instanceof Error) raiseError(error) } - } as any, // TO FIX: not sure how to fix this yet + } as typeof method, args, ] }