File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
packages/nextjs/src/utils Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,18 @@ import { NextApiRequest, NextApiResponse } from 'next';
28
28
// the test app would refer to the other version of the type (from the test app's `node_modules`). By using a custom
29
29
// version of the type compatible with both the old and new official versions, we can use any Next version we want in
30
30
// a test app without worrying about type errors.
31
- type NextApiHandler = ( req : NextApiRequest , res : NextApiResponse ) => void | Promise < void > | unknown | Promise < unknown > ;
32
- export type WrappedNextApiHandler = ( req : NextApiRequest , res : NextApiResponse ) => Promise < void > | Promise < unknown > ;
31
+
32
+ // TODO: fix the comments above and explain extra properties
33
+ export type NextApiHandler = {
34
+ __sentry_route__ ?: string ;
35
+ ( req : NextApiRequest , res : NextApiResponse ) : void | Promise < void > | unknown | Promise < unknown > ;
36
+ } ;
37
+
38
+ export type WrappedNextApiHandler = {
39
+ __sentry_route__ ?: string ;
40
+ __sentry_wrapped__ ?: boolean ;
41
+ ( req : NextApiRequest , res : NextApiResponse ) : Promise < void > | Promise < unknown > ;
42
+ } ;
33
43
34
44
export type AugmentedNextApiResponse = NextApiResponse & {
35
45
__sentryTransaction ?: Transaction ;
You can’t perform that action at this time.
0 commit comments