Skip to content

Commit

Permalink
fix(sveltekit): Adjust handleErrorWithSentry type (#9054)
Browse files Browse the repository at this point in the history
`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>
  • Loading branch information
krist7599555 and Lms24 authored Sep 20, 2023
1 parent b372f8e commit 5f7df8c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/sveltekit/src/index.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T extends HandleClientError | HandleServerError>(
handleError?: T,
): ReturnType<T>;
export declare function handleErrorWithSentry<T extends HandleClientError | HandleServerError>(handleError?: T): T;

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

0 comments on commit 5f7df8c

Please sign in to comment.