We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
kEmptyObject
1 parent b187d55 commit 702bfa0Copy full SHA for 702bfa0
lib/async_hooks.js
@@ -20,6 +20,7 @@ const {
20
ERR_ASYNC_TYPE,
21
ERR_INVALID_ASYNC_ID
22
} = require('internal/errors').codes;
23
+const { kEmptyObject } = require('internal/util');
24
const {
25
validateFunction,
26
validateString,
@@ -156,7 +157,7 @@ function createHook(fns) {
156
157
const destroyedSymbol = Symbol('destroyed');
158
159
class AsyncResource {
- constructor(type, opts = {}) {
160
+ constructor(type, opts = kEmptyObject) {
161
validateString(type, 'type');
162
163
let triggerAsyncId = opts;
0 commit comments