Rush Stack商店博客活动
跳到主要内容

@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;
}

另请参阅