Skip to content

Commit 2adf5c2

Browse files
Mohsen Azimisokra
authored andcommitted
Better JSDocs for makeNewProfiledTapFn
1 parent 2b66263 commit 2adf5c2

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

lib/debug/ProfilingPlugin.js

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -320,24 +320,16 @@ const makeInterceptorFor = (instance, tracer) => hookName => ({
320320
}
321321
});
322322

323-
/**
324-
* @typedef NewProfiledTapOptions
325-
* @property {string} name
326-
* @property {string} type
327-
* @property {Function} fn
328-
* @description Options for the profiled fn.
329-
*/
330-
331323
/**
332324
* @param {string} hookName Name of the hook to profile.
333325
* @param {{counter: number, trace: *, profiler: *}} tracer Instance of tracer.
326+
* @param {object} options Options for the profiled fn.
327+
* @param {string=} options.name
328+
* @param {string=} options.type
329+
* @param {(...args: any[]) => Promise<any>} options.fn
334330
* @returns {*} Chainable hooked function.
335331
*/
336-
const makeNewProfiledTapFn = (
337-
hookName,
338-
tracer,
339-
/** @type {NewProfiledTapOptions} */ { name, type, fn }
340-
) => {
332+
const makeNewProfiledTapFn = (hookName, tracer, { name, type, fn }) => {
341333
const defaultCategory = ["blink.user_timing"];
342334

343335
switch (type) {

0 commit comments

Comments
 (0)