Skip to content

Commit 8c20fd2

Browse files
authored
ref: Make ExpressRequest not extend http.IncomingMessage anymore (#3211)
1 parent 21196ac commit 8c20fd2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/node/src/handlers.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,13 @@ import { flush } from './sdk';
2020

2121
const DEFAULT_SHUTDOWN_TIMEOUT = 2000;
2222

23-
export interface ExpressRequest extends http.IncomingMessage {
24-
[key: string]: any;
23+
export interface ExpressRequest {
2524
baseUrl?: string;
25+
connection?: {
26+
remoteAddress?: string;
27+
};
2628
ip?: string;
29+
method?: string;
2730
originalUrl?: string;
2831
route?: {
2932
path: string;
@@ -33,6 +36,11 @@ export interface ExpressRequest extends http.IncomingMessage {
3336
},
3437
];
3538
};
39+
query?: {
40+
// It can be: undefined | string | string[] | ParsedQs | ParsedQs[] (from `qs` package), but we dont want to pull it.
41+
[key: string]: unknown;
42+
};
43+
url?: string;
3644
user?: {
3745
[key: string]: any;
3846
};

0 commit comments

Comments
 (0)