Skip to content

Commit

Permalink
chore: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Dec 16, 2021
1 parent 3c6c6dc commit f2e4c17
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ const noop = () => {};
/** @typedef {import("webpack").Stats} Stats */
/** @typedef {import("webpack").MultiStats} MultiStats */

// TODO fix me
/**
* @typedef {Object} ExtendedServerResponse
* @property {{ webpack?: { devMiddleware?: Context<any, any> } }} [locals]
* @property {{ webpack?: { devMiddleware?: Context<IncomingMessage, ServerResponse> } }} [locals]
*/

/** @typedef {import("http").IncomingMessage} IncomingMessage */
Expand Down
6 changes: 4 additions & 2 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export = wdm;
/** @typedef {import("webpack").MultiStats} MultiStats */
/**
* @typedef {Object} ExtendedServerResponse
* @property {{ webpack?: { devMiddleware?: Context<any, any> } }} [locals]
* @property {{ webpack?: { devMiddleware?: Context<IncomingMessage, ServerResponse> } }} [locals]
*/
/** @typedef {import("http").IncomingMessage} IncomingMessage */
/** @typedef {import("http").ServerResponse & ExtendedServerResponse} ServerResponse */
Expand Down Expand Up @@ -186,7 +186,9 @@ type ExtendedServerResponse = {
| {
webpack?:
| {
devMiddleware?: Context<any, any> | undefined;
devMiddleware?:
| Context<import("http").IncomingMessage, ServerResponse>
| undefined;
}
| undefined;
}
Expand Down

0 comments on commit f2e4c17

Please sign in to comment.