mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
feat(nodejs) added stronger typing for http status codes
This commit is contained in:
Vendored
+4
-1
@@ -348,7 +348,10 @@ declare module "http" {
|
||||
}
|
||||
export interface Agent { maxSockets: number; sockets: any; requests: any; }
|
||||
|
||||
export var STATUS_CODES: any;
|
||||
export var STATUS_CODES: {
|
||||
[errorCode: number]: string;
|
||||
[errorCode: string]: string;
|
||||
};
|
||||
export function createServer(requestListener?: (request: ServerRequest, response: ServerResponse) =>void ): Server;
|
||||
export function createClient(port?: number, host?: string): any;
|
||||
export function request(options: any, callback?: Function): ClientRequest;
|
||||
|
||||
Reference in New Issue
Block a user