mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Fix type of createPushResponse() in node http2. (#20510)
* Fix type of createPushResponse() in node http2. From https://github.com/nodejs/node/blob/master/lib/internal/http2/compat.js#L628: `callback` is required to be a function. And its second argument is an `Http2ServerResponse`. * `err` is nullable. * delete redundant tests that have partial arguments
This commit is contained in:
@@ -3353,8 +3353,7 @@ namespace http2_tests {
|
||||
let headersSent: boolean = response.headersSent;
|
||||
|
||||
response.setTimeout(0, () => {});
|
||||
response.createPushResponse(outgoingHeaders);
|
||||
response.createPushResponse(outgoingHeaders, (err: Error) => {});
|
||||
response.createPushResponse(outgoingHeaders, (err: Error | null, res: http2.Http2ServerResponse) => {});
|
||||
|
||||
response.writeContinue();
|
||||
response.writeHead(200);
|
||||
|
||||
Reference in New Issue
Block a user