mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
Add overload for http.Server.listen
The backlog parameter should be optional while still accepting the port parameter.
This commit is contained in:
1
node/node.d.ts
vendored
1
node/node.d.ts
vendored
@@ -340,6 +340,7 @@ declare module "http" {
|
||||
|
||||
export interface Server extends events.EventEmitter {
|
||||
listen(port: number, hostname?: string, backlog?: number, callback?: Function): Server;
|
||||
listen(port: number, hostname?: string, callback?: Function): Server;
|
||||
listen(path: string, callback?: Function): Server;
|
||||
listen(handle: any, listeningListener?: Function): Server;
|
||||
close(cb?: any): Server;
|
||||
|
||||
Reference in New Issue
Block a user