@@ -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.
6565function 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).
7070function 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.
7373function after (asyncId ) { }
7474
75- // Destroy is called when the resource is destroyed.
75+ // destroy() is called when the resource is destroyed.
7676function 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).
8181function 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.
113113function 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).
118118function 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.
121121function after (asyncId ) { }
122122
123- // Destroy is called when the resource is destroyed.
123+ // destroy() is called when the resource is destroyed.
124124function 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).
129129function promiseResolve (asyncId ) { }
130130```
0 commit comments