8000 fix(types): make requestHandler options an own type · getsentry/sentry-javascript@035c081 · GitHub
[go: up one dir, main page]

Skip to content

Commit 035c081

Browse files
authored
fix(types): make requestHandler options an own type
Resolves #2994
1 parent a0b636b commit 035c081

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/node/src/handlers.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,16 @@ export function parseRequest(
242242
return event;
243243
}
244244

245+
export type RequestHandlerOptions = ParseRequestOptions & {
246+
flushTimeout?: number;
247+
}
248+
245249
/**
246250
* Express compatible request handler.
247251
* @see Exposed as `Handlers.requestHandler`
248252
*/
249253
export function requestHandler(
250-
options?: ParseRequestOptions & {
251-
flushTimeout?: number;
252-
},
254+
options?: RequestHandlerOptions
253255
): (req: http.IncomingMessage, res: http.ServerResponse, next: (error?: any) => void) => void {
254256
return function sentryRequestMiddleware(
255257
req: http.IncomingMessage,

0 commit comments

Comments
 (0)
0