-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[node] Improve http2 definitions #33019
[node] Improve http2 definitions #33019
Conversation
@adnsio Thank you for submitting this PR! 🔔 @microsoft @DefinitelyTyped @jkomyno @a-tarasyuk @alvis @r3nya @btoueg @BrunoScheufler @smac89 @tellnes @Touffy @DeividasBakanas @eyqs @Flarna @Hannes-Magnusson-CK @KSXGitHub @hoo29 @kjin @ajafff @islishude @mwiktorczyk @matthieusieben @mohsen1 @n-e @octo-sniffle @parambirs @eps1lon @SimonSchick @ThomasdenH @WilcoBakker @wwwy3y3 @ZaneHannanAU @jeremiergz @samuela @kuehlein @j-oliveras @bhongy - please review this PR in the next few days. Be sure to explicitly select If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead. |
@adnsio The Travis CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
Http2ServerResponse and Http2ServerRequest have their constructor marked a private. But according to the documentation, it should be possible to extend them. https://nodejs.org/api/http2.html#http2_http2_createsecureserver_options_onrequesthandler As a part of this PR can you into changing access modifier for these constructors? |
@adnsio The Travis CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests pls, (only needed for v11).
Feel also free to move the http2
section from node-tests.ts
to /test/http2.ts
, that's entirely optional tho.
- Moved tests to folder - Added tests for aborted and authority on request - Added tests for flushHeaders on response - Removed http2 tests from node-tests.ts
@adnsio The Travis CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! |
@SimonSchick I've added some tests and moved all to |
@adnsio I haven't seen anything from you in a while and this PR currently has problems that prevent it from being merged. The PR will be closed tomorrow if there aren't new commits to fix the issues. |
@adnsio To keep things tidy, we have to close PRs that aren't mergeable but don't have activity from their author. No worries, though - please open a new PR if you'd like to continue with this change. Thank you! |
@SimonSchick @Flarna someone can merge this pull request? |
@sanders could you please re-open and merge this? CI fails are unrelated as far as I can see. |
A definition owner has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped! |
We're having CI problems that are causing significant issues for widely consumed packages (esp Node). We know how frustrating it is and we're working on a fix, which you can track here: microsoft/TypeScript#29898. Sorry! |
@adnsio Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day! |
Changes:
Http2ServerResponse
extendsstream.Writable
instead ofevents.EventEmitter
Checks:
Use a meaningful title for the pull request. Include the name of the package modified.
Test the change in your own code. (Compile and run.)
Add or edit tests to reflect the change. (Run with
npm test
.)Follow the advice from the readme.
Avoid common mistakes.
Run
npm run lint package-name
(ortsc
if notslint.json
is present).Provide a URL to documentation or source code which provides context for the suggested changes:
https://nodejs.org/api/http2.html#http2_class_http2_http2serverrequest
https://nodejs.org/api/http2.html#http2_class_http2_http2serverresponse
Increase the version number in the header if appropriate.
If you are making substantial changes, consider adding a
tslint.json
containing{ "extends": "dtslint/dt.json" }
.