From 5f7df8c209b0a411f45a1acd63f575d9e44682bf Mon Sep 17 00:00:00 2001 From: Krist Ponpairin Date: Wed, 20 Sep 2023 16:24:09 +0700 Subject: [PATCH] fix(sveltekit): Adjust `handleErrorWithSentry` type (#9054) `handleErrorWithSentry`, which is wrapper function, should be identity function (`f(x) => x`). Implementation is fine, just the type mismatch from implementation. Co-authored-by: Lukas Stracke --- packages/sveltekit/src/index.types.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/sveltekit/src/index.types.ts b/packages/sveltekit/src/index.types.ts index 63345e81ccab..3b2393ea4d15 100644 --- a/packages/sveltekit/src/index.types.ts +++ b/packages/sveltekit/src/index.types.ts @@ -17,9 +17,7 @@ import type * as serverSdk from './server'; /** Initializes Sentry SvelteKit SDK */ export declare function init(options: Options | clientSdk.BrowserOptions | serverSdk.NodeOptions): void; -export declare function handleErrorWithSentry( - handleError?: T, -): ReturnType; +export declare function handleErrorWithSentry(handleError?: T): T; /** * Wrap a universal load function (e.g. +page.js or +layout.js) with Sentry functionality