-
-
Notifications
You must be signed in to change notification settings - Fork 989
Node v8 stream destroy and _destroy methods #187
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
Comments
It seems it would be as simple as removing One thing to consider is that the Node V8 https://nodejs.org/api/stream.html#stream_writable_destroy_error |
Node.js 8 standardized the destroy() stream interface, so let's use that interface. To update your code, change this: ```js peer.destroy(callback) ``` To this instead: ```js peer.on('close', callback) peer.destroy() ``` Fixes: #187
I think we can switch to the new interface and just shim the missing This is a breaking change since it changes the API, but it makes the API match Node.js which is aligns with user expectations and the stated goal of this package (to emulate PR here: #237 |
Node.js 8 standardized the destroy() stream interface, so let's use that interface. To update your code, change this: ```js peer.destroy(callback) ``` To this instead: ```js peer.on('close', callback) peer.destroy() ``` Fixes: feross#187
Node v8 introduced some changes to stream API. One of them is
destroy
method:According to this specification,
Is there a chance to adapt your library to node v8 and later on fix the TypeScript definitions?
The text was updated successfully, but these errors were encountered: