asyncResource.bind(fn[, thisArg])


版本历史
版本变更
v20.0.0

添加到绑定函数的 asyncResource 属性已被弃用,将在未来版本中删除。

v17.8.0, v16.15.0

thisArg 未定义时的默认值更改为使用调用方的 this

v16.0.0

添加了可选的 thisArg。

v14.8.0, v12.19.0

新增于: v14.8.0, v12.19.0

  • fn <Function> 绑定到当前 AsyncResource 的函数。

    \fn <Function> The function to bind to the current AsyncResource.

  • thisArg <any>

将要执行的给定函数绑定到此 AsyncResource 的范围。

\Binds the given function to execute to this AsyncResource's scope.

AltStyle によって変換されたページ (->オリジナル) /