Skip to content

Conversation

@kamilogorek
Copy link
Contributor

This should fix #1530

@kamilogorek kamilogorek requested a review from HazAT September 17, 2018 09:33

/** The Agent used for corresponding transport */
protected client: http.Agent | https.Agent | undefined;
protected client: http.Agent | https.Agent | https.Agent | undefined;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is one https.Agent too much, right?

@SimonSchick
Copy link
Contributor

❤️

/** JSDoc */
export function requestHandler(): (req: Request, res: Response, next: () => void) => void {
return function sentryRequestMiddleware(req: Request, _res: Response, next: () => void): void {
export function requestHandler(): (req: http.ClientRequest, res: http.ServerResponse, next: () => void) => void {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a note, I don't exactly know what kind of style for imports you are following but you can import just import ClientRequest and ServerResponse to reduce verbosity or are you doing this to avoid type collissions in your builds?

@kamilogorek
Copy link
Contributor Author

@SimonSchick we do have some types that may interfere, therefore I sometimes used different syntax. It's always better to unify though, so all external and native modules are now using prefixed syntax. Thanks for pointing that out.

@kamilogorek kamilogorek merged commit 976edc1 into master Sep 18, 2018
@kamilogorek kamilogorek deleted the node-types branch September 18, 2018 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[@sentry/node] "Cannot find name" TypeScript build errors

4 participants