You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since node 8 and the introduction of util.promisify() many internal node modules have started using these two Symbols to provide hints to util.promisify() as to how the function should be promisified. However, only Symbol(util.promisify.custom) is readily available:
Would it be possible to also expose a reference to the latter in a more convenient way, maybe as require('util').promisify.args? Is there a reason Symbol(customPromisifyArgs) isn't exposed the same way as Symbol(util.promisify.custom)?
The text was updated successfully, but these errors were encountered:
From the discussion that landed util.promisify in core, we exposed the more generic custom symbol while hiding customPromisifyArgs because we wanted to gauge if/how much the latter could be helpful to userland, especially since the latter could be implemented in terms of the former. Plus, the semantics of Symbol(customPromisifyArgs) is not as clear and undebatable as Symbol(util.promisify.custom).
Since node 8 and the introduction of
util.promisify()
many internal node modules have started using these twoSymbol
s to provide hints toutil.promisify()
as to how the function should be promisified. However, onlySymbol(util.promisify.custom)
is readily available:The second one
Symbol(customPromisifyArgs)
is a bit more difficult to get a reference to, but it can be done:Would it be possible to also expose a reference to the latter in a more convenient way, maybe as
require('util').promisify.args
? Is there a reasonSymbol(customPromisifyArgs)
isn't exposed the same way asSymbol(util.promisify.custom)
?The text was updated successfully, but these errors were encountered: