| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Instead of recommending `0` as the magic value to set max listeners to unlimited, recommend `Infinity`. This paves the way for `0` as a magic value eventually being deprecated and finally removed closes nodejs/node-v0.x-archive#22987
|
LGTM |
Sorry, something went wrong.
|
LGTM, but I don't think we need to ever deprecate/remove the use of 0 as magic value. It is a common paradigm. |
Sorry, something went wrong.
|
One problem with removing references to setMaxListeners(0) (in favor of Infinity) is that if someone sees that in code and wants to look at the docs to figure out what's going on, the docs won't have an answer for them. Would you be opposed to rewording that to Set to Infinity (or zero) for unlimited.? |
Sorry, something went wrong.
|
@chrisdickinson I'm okay with documenting 0 for a while. Ideally the whole point of this is for people to move away from using 0 at all. But for a transitional period, it makes sense to keep the old pattern documented. wording updated |
Sorry, something went wrong.
|
LGTM. |
Sorry, something went wrong.
Instead of recommending `0` as the magic value to set max listeners to unlimited, recommend `Infinity`. This paves the way for `0` as a magic value eventually being deprecated and finally removed. PR-URL: #2559 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com> Reviewed-By: Roman Reiss <me@silverwind.io>
|
Thanks! Landed with some slight modifications to the commit message in 775c01e. |
Sorry, something went wrong.
Instead of recommending `0` as the magic value to set max listeners to unlimited, recommend `Infinity`. This paves the way for `0` as a magic value eventually being deprecated and finally removed. PR-URL: #2559 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: targos - Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Brendan Ashworth <brendan.ashworth@me.com> Reviewed-By: Roman Reiss <me@silverwind.io>
| Back | FazBrowse Home | New Git URL |
Instead of recommending 0 as the magic value to set max listeners to unlimited, recommend Infinity.
This paves the way for 0 as a magic value eventually being deprecated and finally removed
original discussion: nodejs/node-v0.x-archive#22987
original PR: nodejs/node-v0.x-archive#25269