Synonyms
defaultvalue
语法
🌐 Syntax
@default [<some value>]
概述
🌐 Overview
@default 标签允许你记录符号的分配值。你可以自己为此标签提供一个值,也可以让 JSDoc 自动从源代码中记录该值——仅当被记录的符号被分配了一个单一的、简单的值时才可能,这个值可以是字符串、数字、布尔值或 null。
🌐 The @default tag allows you to document the assigned value of a symbol. You can supply this tag with a value yourself or you can allow JSDoc to automatically document the value from the source code -- only possible when the documented symbol is being assigned a single, simple value that is either: a string, a number, a boolean or null.
示例
🌐 Examples
在此示例中记录了一个常量。常量的值是 0xff0000。通过添加 @default 标记,该值会自动添加到文档中。
🌐 In this example a constant is documented. The value of the constant is 0xff0000. By adding the
@default tag this value is automatically added to the documentation.
/**
* @constant
* @default
*/
const RED = 0xff0000;