Skip to content

Commit f2e4c17

Browse files
chore: fix types
1 parent 3c6c6dc commit f2e4c17

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/index.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ const noop = () => {};
1818
/** @typedef {import("webpack").Stats} Stats */
1919
/** @typedef {import("webpack").MultiStats} MultiStats */
2020

21-
// TODO fix me
2221
/**
2322
* @typedef {Object} ExtendedServerResponse
24-
* @property {{ webpack?: { devMiddleware?: Context<any, any> } }} [locals]
23+
* @property {{ webpack?: { devMiddleware?: Context<IncomingMessage, ServerResponse> } }} [locals]
2524
*/
2625

2726
/** @typedef {import("http").IncomingMessage} IncomingMessage */

types/index.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export = wdm;
88
/** @typedef {import("webpack").MultiStats} MultiStats */
99
/**
1010
* @typedef {Object} ExtendedServerResponse
11-
* @property {{ webpack?: { devMiddleware?: Context<any, any> } }} [locals]
11+
* @property {{ webpack?: { devMiddleware?: Context<IncomingMessage, ServerResponse> } }} [locals]
1212
*/
1313
/** @typedef {import("http").IncomingMessage} IncomingMessage */
1414
/** @typedef {import("http").ServerResponse & ExtendedServerResponse} ServerResponse */
@@ -186,7 +186,9 @@ type ExtendedServerResponse = {
186186
| {
187187
webpack?:
188188
| {
189-
devMiddleware?: Context<any, any> | undefined;
189+
devMiddleware?:
190+
| Context<import("http").IncomingMessage, ServerResponse>
191+
| undefined;
190192
}
191193
| undefined;
192194
}

0 commit comments

Comments
 (0)