Skip to content

Commit

Permalink
fix(types): make requestHandler options an own type (#2995)
Browse files Browse the repository at this point in the history
Resolves #2994
  • Loading branch information
rchl committed Oct 27, 2020
1 parent a0b636b commit c88499f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/node/src/handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,16 @@ export function parseRequest(
return event;
}

export type RequestHandlerOptions = ParseRequestOptions & {
flushTimeout?: number;
};

/**
* Express compatible request handler.
* @see Exposed as `Handlers.requestHandler`
*/
export function requestHandler(
options?: ParseRequestOptions & {
flushTimeout?: number;
},
options?: RequestHandlerOptions,
): (req: http.IncomingMessage, res: http.ServerResponse, next: (error?: any) => void) => void {
return function sentryRequestMiddleware(
req: http.IncomingMessage,
Expand Down

0 comments on commit c88499f

Please sign in to comment.