Skip to main content

@function

Syntax​

@function
@function name

Overview​

@function marks a symbol as a function. Use it when JSDoc would otherwise infer a different kind for the symbol – for example, when a variable holds a function assigned at runtime.

Examples​

Explicit function declaration​

/** @function */
var parse = function (str) {};

With an explicit name​

/**
* @function module:utils.format
*/
var _privateFormatter = function (value) {};

See also​