Skip to content

Commit 4775684

Browse files
committed
docs: renaming Number to number
1 parent d103566 commit 4775684

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

doc/api/async_hooks.md

+19-19
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ destructor calls are emulated.
140140

141141
##### `init(id, type, triggerId, resource)`
142142

143-
* `id` {Number} a unique id for the async resource
143+
* `id` {number} a unique id for the async resource
144144
* `type` {String} the type of the async resource
145-
* `triggerId` {Number} the unique id of the async resource in whose
145+
* `triggerId` {number} the unique id of the async resource in whose
146146
execution context this async resource was created
147147
* `resource` {Object} reference to the resource representing the async operation,
148148
needs to be released during _destroy_
@@ -289,7 +289,7 @@ the **why** use `triggerId`.
289289

290290
##### `before(id)`
291291

292-
* `id` {Number}
292+
* `id` {number}
293293

294294
When an asynchronous operation is triggered (such as a TCP server receiving a
295295
new connection) or completes (such as writing data to disk) a callback is
@@ -303,7 +303,7 @@ and exactly 1 time if the resource is a request.
303303

304304
##### `after(id)`
305305

306-
* `id` {Number}
306+
* `id` {number}
307307

308308
Called immediately after the callback specified in `before()` is completed. If
309309
an uncaught exception occurs during execution of the callback then `after()`
@@ -312,7 +312,7 @@ will run after the `'uncaughtException'` event or a `domain`'s handler runs.
312312

313313
##### `destroy(id)`
314314

315-
* `id` {Number}
315+
* `id` {number}
316316

317317
Called either when the class destructor is run or if the resource is manually
318318
marked as free. For core C++ classes that have a destructor the callback will
@@ -330,7 +330,7 @@ the resource doesn't depend on GC then this isn't an issue.
330330

331331
#### `async_hooks.currentId()`
332332

333-
* Returns {Number} the `id` of the current execution context. Useful to track when
333+
* Returns {number} the `id` of the current execution context. Useful to track when
334334
something fires.
335335

336336
For example:
@@ -362,7 +362,7 @@ const server = net.createServer(function onconnection(conn) {
362362

363363
#### `async_hooks.triggerId()`
364364

365-
* Returns {Number} the id of the resource responsible for calling the callback
365+
* Returns {number} the id of the resource responsible for calling the callback
366366
that is currently being executed.
367367

368368
For example:
@@ -425,7 +425,7 @@ asyncEvent.triggerId();
425425

426426
* arguments
427427
* `type` {String} the type of ascycn event
428-
* `triggerId` {Number} the id of the execution context that created this async
428+
* `triggerId` {number} the id of the execution context that created this async
429429
event
430430
* Returns {AsyncEvent} A reference to `asyncHook`.
431431

@@ -483,13 +483,13 @@ never be called.
483483

484484
#### `asyncEvent.asyncId()`
485485

486-
* Returns {Number} the unique `id` assigned to the resource.
486+
* Returns {number} the unique `id` assigned to the resource.
487487

488488
Useful when used with `triggerIdScope()`.
489489

490490
#### `asyncEvent.triggerId()`
491491

492-
* Returns {Number} the same `triggerId` that is passed to `init()` hooks.
492+
* Returns {number} the same `triggerId` that is passed to `init()` hooks.
493493

494494
### Standalone JS API
495495

@@ -529,7 +529,7 @@ async_hooks.emitDestroy(id);
529529

530530
#### `async_hooks.newId()`
531531

532-
* Returns {Number} a new unique `id` meant for a newly created asynchronous resource.
532+
* Returns {number} a new unique `id` meant for a newly created asynchronous resource.
533533

534534
The value returned will never be assigned to another resource.
535535

@@ -546,7 +546,7 @@ class MyClass {
546546

547547
#### `async_hooks.initTriggerId()`
548548

549-
* Returns {Number}
549+
* Returns {number}
550550

551551
There are several ways to set the `triggerId` for an instantiated resource.
552552
This API is how that value is retrieved. It returns the `id` of the resource
@@ -555,9 +555,9 @@ responsible for the newly created resource being instantiated. For example:
555555

556556
#### `async_hooks.emitInit(id, type[, triggerId][, resource])`
557557

558-
* `id` {Number} Generated by calling `newId()`
558+
* `id` {number} Generated by calling `newId()`
559559
* `type` {String}
560-
* `triggerId` {Number} **Default:** `currentId()`
560+
* `triggerId` {number} **Default:** `currentId()`
561561
* `resource` {Object}
562562
* Returns {Undefined}
563563

@@ -583,8 +583,8 @@ constructor.
583583

584584
#### `async_hooks.emitBefore(id[, triggerId])`
585585

586-
* `id` {Number} Generated by `newId()`
587-
* `triggerId` {Number}
586+
* `id` {number} Generated by `newId()`
587+
* `triggerId` {number}
588588
* Returns {Undefined}
589589

590590
Notify `before()` hooks that the resource is about to enter its execution call
@@ -609,7 +609,7 @@ MyThing.prototype.done = function done() {
609609

610610
#### `async_hooks.emitAfter(id)`
611611

612-
* `id` {Number} Generated by `newId()`
612+
* `id` {number} Generated by `newId()`
613613
* Returns {Undefined}
614614

615615
Notify `after()` hooks that the resource is exiting its execution call stack.
@@ -635,15 +635,15 @@ fatal exception handler.
635635

636636
#### `async_hooks.emitDestroy(id)`
637637

638-
* `id` {Number} Generated by `newId()`
638+
* `id` {number} Generated by `newId()`
639639
* Returns {Undefined}
640640

641641
Notify hooks that a resource is being destroyed (or being moved to the free'd
642642
resource pool).
643643

644644
#### `async_hooks.triggerIdScope(triggerId, callback)`
645645

646-
* `triggerId` {Number}
646+
* `triggerId` {number}
647647
* `callback` {Function}
648648
* Returns {Undefined}
649649

0 commit comments

Comments
 (0)