Skip to content

Commit 5f7df8c

Browse files
krist7599555Lms24
andauthored
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 <lukas.stracke@sentry.io>
1 parent b372f8e commit 5f7df8c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/sveltekit/src/index.types.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,7 @@ import type * as serverSdk from './server';
1717
/** Initializes Sentry SvelteKit SDK */
1818
export declare function init(options: Options | clientSdk.BrowserOptions | serverSdk.NodeOptions): void;
1919

20-
export declare function handleErrorWithSentry<T extends HandleClientError | HandleServerError>(
21-
handleError?: T,
22-
): ReturnType<T>;
20+
export declare function handleErrorWithSentry<T extends HandleClientError | HandleServerError>(handleError?: T): T;
2321

2422
/**
2523
* Wrap a universal load function (e.g. +page.js or +layout.js) with Sentry functionality

0 commit comments

Comments
 (0)