Skip to content

Commit

Permalink
doc: make some parameters optional in tracingChannel.traceCallback
Browse files Browse the repository at this point in the history
Plus, add missing `position` parameter to CJS example.

PR-URL: #54068
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com>
  • Loading branch information
deokjinkim authored and jakecastelli committed Aug 7, 2024
1 parent 7327e44 commit a4f609f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/api/diagnostics_channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ channels.tracePromise(async () => {
});
```

#### `tracingChannel.traceCallback(fn, position, context, thisArg, ...args)`
#### `tracingChannel.traceCallback(fn[, position[, context[, thisArg[, ...args]]]])`

<!-- YAML
added:
Expand Down Expand Up @@ -927,7 +927,7 @@ const channels = diagnostics_channel.tracingChannel('my-channel');
channels.traceCallback((arg1, callback) => {
// Do something
callback(null, 'result');
}, {
}, 1, {
some: 'thing',
}, thisArg, arg1, callback);
```
Expand Down

0 comments on commit a4f609f

Please sign in to comment.