Skip to content

Commit 07cac20

Browse files
author
Luca Forstner
committed
Fix withSentryAPI type
1 parent c08dacc commit 07cac20

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/nextjs/src/index.types.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ export declare function flush(timeout?: number | undefined): PromiseLike<boolean
3030
export declare function lastEventId(): string | undefined;
3131
export declare function getSentryRelease(fallback?: string): string | undefined;
3232

33-
interface ApiRouteHandler {
34-
(...args: any[]): any;
35-
}
36-
37-
export declare function withSentryAPI(handler: ApiRouteHandler, parameterizedRoute: string): ApiRouteHandler;
33+
export declare function withSentryAPI<H extends (...args: any[]) => any>(
34+
handler: H,
35+
parameterizedRoute: string,
36+
): (...args: Parameters<H>) => Promise<ReturnType<H>>;

0 commit comments

Comments
 (0)