我习惯使用Atlas,那里首选的(据我所知)方法是使用XML注释,例如:
/// <summary>
/// Method to calculate distance between two points
/// </summary>
///
/// <param name="pointA">First point</param>
/// <param name="pointB">Second point</param>
///
function calculatePointDistance(pointA, pointB) { ... }
最近我一直在研究其他第三方JavaScript库,看到类似以下语法:
/*
* some comment here
* another comment here
* ...
*/
function blahblah() { ... }
还有没有适用于JavaScript的API生成器,可以读取“首选”注释风格作为额外的福利?