feat(nodejs) added stronger typing for http status codes

This commit is contained in:
basarat
2014-05-23 20:08:56 +10:00
parent 568cb00761
commit dd5499cc0d
2 changed files with 14 additions and 1 deletions
+4 -1
View File
@@ -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;