概述
¥Overview
@global 标记指定符号应作为全局符号出现在文档中。JSDoc 忽略源文件中符号的实际范围。此标记对于本地定义然后分配给全局符号的符号特别有用。
¥The @global tag specifies that a symbol should appear in the documentation as a global symbol. JSDoc ignores the symbol's actual scope within the source file. This tag is especially useful for symbols that are defined locally, then assigned to a global symbol.
示例
¥Examples
使用 @global 标记指定应将符号记录为全局符号。
¥Use the @global tag to specify that a symbol should be documented as global.
(function() {
/** @global */
var foo = 'hello foo';
this.foo = foo;
}).apply(window);