Skip to content

Commit d023fd0

Browse files
committed
chore: updated jsdoc for the after function
1 parent fb7c506 commit d023fd0

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

lib/shim/specs/recorder.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,17 @@ const WrapSpec = require('./wrap')
2424
* The instrumented function must have been invoked synchronously.
2525
*
2626
* @typedef {Function} SpecAfterFunction
27-
* @param {object} shim The shim used to instrument the external library.
28-
* @param {Function} fn The function/method from the external library being
27+
* @param {Object} params params to function
28+
* @param {object} params.shim The shim used to instrument the external library.
29+
* @param {Function} params.fn The function/method from the external library being
2930
* instrumented.
30-
* @param {string} name The name of the current function.
31-
* @param {Error|null} error If the instrumented function threw an error, this
32-
* will be that error.
33-
* @param {*} value The result returned by the instrumented function.
34-
* @param {TraceSegment} segment The segment used while instrumenting the
31+
* @param {string} params.name The name of the current function.
32+
* @param {Error|null} [params.error] If the instrumented function threw an error, this
33+
* will be that error. In the case of a callback this will be omitted.
34+
* @param {Array} [params.args] arguments passed to a callback function getting instrumented.
35+
* @param {*} [params.result] The result returned by the instrumented function. In the case of a wrapped
36+
* callback, the data needed is in `params.args`.
37+
* @param {TraceSegment} params.segment The segment used while instrumenting the
3538
* function.
3639
*/
3740

0 commit comments

Comments
 (0)