mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
doc: make some parameters optional in tracingChannel.traceCallback
Plus, add missing `position` parameter to CJS example. PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
committed by
jakecastelli
parent
7327e44a05
commit
a4f609faf5
@@ -872,7 +872,7 @@ channels.tracePromise(async () => {
|
||||
});
|
||||
```
|
||||
|
||||
#### `tracingChannel.traceCallback(fn, position, context, thisArg, ...args)`
|
||||
#### `tracingChannel.traceCallback(fn[, position[, context[, thisArg[, ...args]]]])`
|
||||
|
||||
<!-- YAML
|
||||
added:
|
||||
@@ -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);
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user