3
我正在用Angular4和Typescript编写esdoc-coverage-plugin和esdoc-typescript-plugin。Typescript ESDoc如何评估评论范围?
在我的代码库,每一个方法,类和成员有一个注释块以这种形式:
/** @method methodName
* @desc method description
* @param {type} paramName - description of paramName
* @returns {type}
*/
methodName(param: type) {
/** the if statement does this */
if(something) {
doSomething();
} else {
doSomethingElse();
}
}
某些文件达到100%,与此格式,其他文件都停留在40%。即使在每行代码上面放置占位符注释之后,即使详细记录每个if-else分支,我也无法提高覆盖率。我错过了什么?
我无法提供代码的物理代码段,但如果您需要更多信息给我一个答案,我可以尝试回答任何后续问题,谢谢。