@param
标准化 | 核心 |
语法类型 | 块标签 |
用法
用于记录函数参数的文档。@param
标签后跟参数名称,然后是连字符,然后是描述。
示例
/**
* Returns the average of two numbers.
*
* @remarks
* This method is part of the {@link core-library#Statistics | Statistics subsystem}.
*
* @param x - The first input number
* @param y - The second input number
* @returns The arithmetic mean of `x` and `y`
*
* @beta
*/
function getAverage(x: number, y: number): number {
return (x + y) / 2.0;
}
另请参阅
- @returns 标签
- RFC #19: 支持
@param
上的点语法 - Issue #151: 记录参数的默认值