Skip to content

Commit 838b143

Browse files
Trottjuanarbol
authored andcommitted
doc: fix comment text in async_hooks example
PR-URL: #42499 Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: Mohammed Keyvanzadeh <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]> Reviewed-By: Mestery <[email protected]>
1 parent 743b62b commit 838b143

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

doc/api/async_hooks.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,24 @@ asyncHook.disable();
5959
// The following are the callbacks that can be passed to createHook().
6060
//
6161

62-
// init is called during object construction. The resource may not have
63-
// completed construction when this callback runs, therefore all fields of the
62+
// init() is called during object construction. The resource may not have
63+
// completed construction when this callback runs. Therefore, all fields of the
6464
// resource referenced by "asyncId" may not have been populated.
6565
function init(asyncId, type, triggerAsyncId, resource) { }
6666

67-
// Before is called just before the resource's callback is called. It can be
67+
// before() is called just before the resource's callback is called. It can be
6868
// called 0-N times for handles (such as TCPWrap), and will be called exactly 1
6969
// time for requests (such as FSReqCallback).
7070
function before(asyncId) { }
7171

72-
// After is called just after the resource's callback has finished.
72+
// after() is called just after the resource's callback has finished.
7373
function after(asyncId) { }
7474

75-
// Destroy is called when the resource is destroyed.
75+
// destroy() is called when the resource is destroyed.
7676
function destroy(asyncId) { }
7777

78-
// promiseResolve is called only for promise resources, when the
79-
// `resolve` function passed to the `Promise` constructor is invoked
78+
// promiseResolve() is called only for promise resources, when the
79+
// resolve() function passed to the Promise constructor is invoked
8080
// (either directly or through other means of resolving a promise).
8181
function promiseResolve(asyncId) { }
8282
```
@@ -107,24 +107,24 @@ asyncHook.disable();
107107
// The following are the callbacks that can be passed to createHook().
108108
//
109109

110-
// init is called during object construction. The resource may not have
111-
// completed construction when this callback runs, therefore all fields of the
110+
// init() is called during object construction. The resource may not have
111+
// completed construction when this callback runs. Therefore, all fields of the
112112
// resource referenced by "asyncId" may not have been populated.
113113
function init(asyncId, type, triggerAsyncId, resource) { }
114114

115-
// Before is called just before the resource's callback is called. It can be
115+
// before() is called just before the resource's callback is called. It can be
116116
// called 0-N times for handles (such as TCPWrap), and will be called exactly 1
117117
// time for requests (such as FSReqCallback).
118118
function before(asyncId) { }
119119

120-
// After is called just after the resource's callback has finished.
120+
// after() is called just after the resource's callback has finished.
121121
function after(asyncId) { }
122122

123-
// Destroy is called when the resource is destroyed.
123+
// destroy() is called when the resource is destroyed.
124124
function destroy(asyncId) { }
125125

126-
// promiseResolve is called only for promise resources, when the
127-
// `resolve` function passed to the `Promise` constructor is invoked
126+
// promiseResolve() is called only for promise resources, when the
127+
// resolve() function passed to the Promise constructor is invoked
128128
// (either directly or through other means of resolving a promise).
129129
function promiseResolve(asyncId) { }
130130
```

0 commit comments

Comments
 (0)