mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 06:47:03 +00:00
Set http IncomingMessage setTimeout callback as optional param (#38514)
* Set http incoming message setTimeout callback as optional param * Add test for http IncomingMessage * Update Definitions by
This commit is contained in:
committed by
Ben Lichtman
parent
6fa32aafe7
commit
f844a93e8c
Vendored
+1
-1
@@ -277,7 +277,7 @@ declare module "http" {
|
||||
rawHeaders: string[];
|
||||
trailers: { [key: string]: string | undefined };
|
||||
rawTrailers: string[];
|
||||
setTimeout(msecs: number, callback: () => void): this;
|
||||
setTimeout(msecs: number, callback?: () => void): this;
|
||||
/**
|
||||
* Only valid for request obtained from http.Server.
|
||||
*/
|
||||
|
||||
Vendored
+1
@@ -38,6 +38,7 @@
|
||||
// Thanik Bhongbhibhat <https://github.com/bhongy>
|
||||
// Marcin Kopacz <https://github.com/chyzwar>
|
||||
// Trivikram Kamat <https://github.com/trivikr>
|
||||
// Minh Son Nguyen <https://github.com/nguymin4>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// NOTE: These definitions support NodeJS and TypeScript 3.2.
|
||||
|
||||
@@ -43,6 +43,7 @@ import * as net from 'net';
|
||||
const incoming: http.IncomingMessage = new http.IncomingMessage(new net.Socket());
|
||||
|
||||
incoming.setEncoding('utf8');
|
||||
incoming.setTimeout(1000).setTimeout(100, () => {});
|
||||
|
||||
// stream
|
||||
incoming.pause();
|
||||
|
||||
Vendored
+1
-1
@@ -184,7 +184,7 @@ declare module "http" {
|
||||
rawHeaders: string[];
|
||||
trailers: { [key: string]: string | undefined };
|
||||
rawTrailers: string[];
|
||||
setTimeout(msecs: number, callback: () => void): this;
|
||||
setTimeout(msecs: number, callback?: () => void): this;
|
||||
/**
|
||||
* Only valid for request obtained from http.Server.
|
||||
*/
|
||||
|
||||
Vendored
+1
@@ -35,6 +35,7 @@
|
||||
// Kyle Uehlein <https://github.com/kuehlein>
|
||||
// Jordi Oliveras Rovira <https://github.com/j-oliveras>
|
||||
// Thanik Bhongbhibhat <https://github.com/bhongy>
|
||||
// Minh Son Nguyen <https://github.com/nguymin4>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// NOTE: These definitions support NodeJS and TypeScript 3.1.
|
||||
|
||||
Vendored
+1
-1
@@ -186,7 +186,7 @@ declare module "http" {
|
||||
rawHeaders: string[];
|
||||
trailers: { [key: string]: string | undefined };
|
||||
rawTrailers: string[];
|
||||
setTimeout(msecs: number, callback: () => void): this;
|
||||
setTimeout(msecs: number, callback?: () => void): this;
|
||||
/**
|
||||
* Only valid for request obtained from http.Server.
|
||||
*/
|
||||
|
||||
Vendored
+1
@@ -38,6 +38,7 @@
|
||||
// Jordi Oliveras Rovira <https://github.com/j-oliveras>
|
||||
// Thanik Bhongbhibhat <https://github.com/bhongy>
|
||||
// Ivan Sieder <https://github.com/ivansieder>
|
||||
// Minh Son Nguyen <https://github.com/nguymin4>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
// NOTE: These definitions support NodeJS and TypeScript 3.2.
|
||||
|
||||
Reference in New Issue
Block a user