Skip to content

Commit 0f82e1d

Browse files
authoredFeb 1, 2022
fix: types (#1187)
1 parent de12c93 commit 0f82e1d

File tree

4 files changed

+768
-571
lines changed

4 files changed

+768
-571
lines changed
 

‎package-lock.json

+762-565
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@
5757
"@babel/cli": "^7.16.7",
5858
"@babel/core": "^7.16.7",
5959
"@babel/preset-env": "^7.16.7",
60-
"@commitlint/cli": "^15.0.0",
61-
"@commitlint/config-conventional": "^15.0.0",
60+
"@commitlint/cli": "^16.1.0",
61+
"@commitlint/config-conventional": "^16.0.0",
6262
"@types/connect": "^3.4.35",
6363
"@types/express": "^4.17.13",
6464
"@types/mime-types": "^2.1.1",

‎src/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const noop = () => {};
118118

119119
/**
120120
* @callback Close
121-
* @param {(err?: Error) => void} callback
121+
* @param {(err: Error | null | undefined) => void} callback
122122
*/
123123

124124
/**
@@ -199,7 +199,7 @@ function wdm(compiler, options = {}) {
199199
let watchOptions;
200200

201201
/**
202-
* @param {Error | undefined} error
202+
* @param {Error | null | undefined} error
203203
*/
204204
const errorHandler = (error) => {
205205
if (error) {

‎types/index.d.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export = wdm;
9090
*/
9191
/**
9292
* @callback Close
93-
* @param {(err?: Error) => void} callback
93+
* @param {(err: Error | null | undefined) => void} callback
9494
*/
9595
/**
9696
* @template {IncomingMessage} Request
@@ -244,7 +244,7 @@ type Middleware<
244244
type GetFilenameFromUrl = (url: string) => string | undefined;
245245
type WaitUntilValid = (callback: Callback) => any;
246246
type Invalidate = (callback: Callback) => any;
247-
type Close = (callback: (err?: Error | undefined) => void) => any;
247+
type Close = (callback: (err: Error | null | undefined) => void) => any;
248248
type AdditionalMethods<
249249
Request_1 extends import("http").IncomingMessage,
250250
Response_1 extends ServerResponse

0 commit comments

Comments
 (0)
Please sign in to comment.