npm i @microsoft/tsdoc
export class Statistics {/*** 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*/public static getAverage(x: number, y: number): number {return (x + y) / 2.0;}}
通过一些列的 tag 来说明。
- 第一行文字表示摘要
- 空行
@remarks表示副标题- 空行
@param参数,解释@returns解释参数- 空行
- beta
表示阶段,范围
- alpha 初级
- beta 公测
- deprecated 弃用
- experimental
- public
- internal
装饰器注释 decorator 解释装饰内容
示例 example 写法
{@link}
- remarks 补充备注
- privateRemarks 代码内注释,外部不可见
