Skip to content

Commit 2f5e8bc

Browse files
committed
chore: upgrade rslint to 0.6.1
1 parent 7218e8d commit 2f5e8bc

3 files changed

Lines changed: 83 additions & 60 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
"devDependencies": {
3030
"@rslib/core": "^0.22.0",
31-
"@rslint/core": "^0.5.3",
31+
"@rslint/core": "^0.6.1",
3232
"@types/debug": "^4.1.13",
3333
"@types/finalhandler": "^1.2.4",
3434
"@types/node": "^24.12.4",

pnpm-lock.yaml

Lines changed: 66 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/index.ts

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export type HandleFunction =
5050
| NextHandleFunction
5151
| ErrorHandleFunction;
5252
export type ServerHandle = HandleFunction | http.Server;
53+
type ListenCallback = () => void;
5354

5455
type Middleware = HandleFunction | Server | http.Server;
5556

@@ -63,13 +64,17 @@ interface Layer extends ServerStackItem {
6364
}
6465

6566
export interface Server extends EventEmitter {
66-
(req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;
67+
(
68+
req: http.IncomingMessage,
69+
res: http.ServerResponse,
70+
next?: NextFunction,
71+
): void;
6772
route: string;
6873
stack: ServerStackItem[];
6974
handle(
7075
req: http.IncomingMessage,
7176
res: http.ServerResponse,
72-
next?: Function,
77+
next?: NextFunction,
7378
): void;
7479
use(fn: NextHandleFunction): Server;
7580
use(fn: HandleFunction): Server;
@@ -81,12 +86,16 @@ export interface Server extends EventEmitter {
8186
port: number,
8287
hostname?: string,
8388
backlog?: number,
84-
callback?: Function,
89+
callback?: ListenCallback,
90+
): http.Server;
91+
listen(
92+
port: number,
93+
hostname?: string,
94+
callback?: ListenCallback,
8595
): http.Server;
86-
listen(port: number, hostname?: string, callback?: Function): http.Server;
87-
listen(path: string, callback?: Function): http.Server;
88-
listen(options: ListenOptions, callback?: Function): http.Server;
89-
listen(handle: unknown, listeningListener?: Function): http.Server;
96+
listen(path: string, callback?: ListenCallback): http.Server;
97+
listen(options: ListenOptions, callback?: ListenCallback): http.Server;
98+
listen(handle: unknown, listeningListener?: ListenCallback): http.Server;
9099
}
91100

92101
/**

0 commit comments

Comments
 (0)