| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| const Readable = Stream.Readable; | ||
| const binding = internalBinding('http2'); | ||
| const constants = binding.constants; | ||
| const { Readable } = Stream; |
There was a problem hiding this comment.
| const { Readable } = Stream; | |
| const { Readable } = require('stream'); |
Sorry, something went wrong.
There was a problem hiding this comment.
thing is that Http2ServerResponse extends from Stream below, so we need a Stream reference as well. if we could use ES6 modules internally, I'd use a 'default', and a 'named import': import Stream, { Readable } from ....
Sorry, something went wrong.
| @@ -4,9 +4,8 @@ const { Object, ObjectPrototype, Reflect } = primordials; | |||
|
|
|||
| const assert = require('internal/assert'); | |||
| const Stream = require('stream'); | |||
There was a problem hiding this comment.
| const Stream = require('stream'); |
Sorry, something went wrong.
|
I am not a huge fan of changes like these. They do not seem to bring much benefit but I won't block this either. |
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
Sorry, something went wrong.
PR-URL: nodejs#28176 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: nodejs#28176 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #28176 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
PR-URL: #28176 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
| Back | FazBrowse Home | New Git URL |
add constant to already destructured constants and while we're at it, destructure Readable and constants as well, remove binding.
Checklist