Synonyms
funcmethod
语法
🌐 Syntax
@function [<FunctionName>]
概述
🌐 Overview
这将一个对象标记为函数,即使解析器看起来可能并不认为它是函数。它将文档注释的 @亲切 设置为 'function'。
🌐 This marks an object as being a function, even though it may not appear to be one to the parser. It sets the doclet's @kind to 'function'.
示例
🌐 Examples
/** @function */
var paginate = paginateFactory(pages);
如果没有 @function 标签,paginate 对象将被记录为通用对象(一个 @成员),因为仅通过检查代码行无法判断 paginate 在运行时将保存哪种类型的值。
🌐 Without the @function tag, the paginate object would be documented as a generic object (a
@member), because it isn't possible to tell from examining the line of code what type
of value paginate will hold when it is run.
/** @function myFunction */
// the above is the same as:
/** @function
* @name myFunction */