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 targos committed Oct 2, 2024
1 parent 782a6a0 commit 07bde05
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 @@ -863,7 +863,7 @@ channels.tracePromise(async () => {
});
```

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

<!-- YAML
added:
Expand Down Expand Up @@ -917,7 +917,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 07bde05

Please sign in to comment.