-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
diagnostics_channelIssues and PRs related to diagnostics channelIssues and PRs related to diagnostics channeldocIssues and PRs related to the documentations.Issues and PRs related to the documentations.
Description
Affected URL(s)
Description of the problem
tracingChannel.traceCallback(fn[, position[, context[, thisArg[, ...args]]]]) - almost all args are marked as optional but it can't be called only with the first argument.
node/lib/diagnostics_channel.js
Lines 383 to 384 in 2f40652
| const callback = ArrayPrototypeAt(args, position); | |
| validateFunction(callback, 'callback'); |
^ callback is required, so we need to call it like this:
channels.traceCallback(
function (callback) {
// Do something
callback(null, 'result');
},
undefined, // position - `-1` by default
undefined, // context - `{}` by default
undefined, // thisArg - any value
callback,
)So all arguments are required but some can be undefined.
Metadata
Metadata
Assignees
Labels
diagnostics_channelIssues and PRs related to diagnostics channelIssues and PRs related to diagnostics channeldocIssues and PRs related to the documentations.Issues and PRs related to the documentations.