From bbb8ce3f63dd1f4bfbbe44ebccc4bb5f556616ef Mon Sep 17 00:00:00 2001 From: Krist Ponpairin Date: Wed, 20 Sep 2023 02:15:59 +0700 Subject: [PATCH 1/2] fix(sveltekit): type handleErrorWithSentry is wrong handleErrorWithSentry should be identity function `f(x) => x` as a wrapper function --- packages/sveltekit/src/index.types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sveltekit/src/index.types.ts b/packages/sveltekit/src/index.types.ts index 63345e81ccab..3ba6f8bf3dff 100644 --- a/packages/sveltekit/src/index.types.ts +++ b/packages/sveltekit/src/index.types.ts @@ -19,7 +19,7 @@ export declare function init(options: Options | clientSdk.BrowserOptions | serve export declare function handleErrorWithSentry( handleError?: T, -): ReturnType; +): T; /** * Wrap a universal load function (e.g. +page.js or +layout.js) with Sentry functionality From e827f494ac61a43fe77905b58fd843795038d712 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Wed, 20 Sep 2023 10:58:38 +0200 Subject: [PATCH 2/2] fix linter --- 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 3ba6f8bf3dff..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, -): T; +export declare function handleErrorWithSentry(handleError?: T): T; /** * Wrap a universal load function (e.g. +page.js or +layout.js) with Sentry functionality