简体   繁体   English

有没有办法在 typedoc 中描述一个字段?

[英]Is there a way to describe a field in typedoc?

The code is:代码是:

/**
* Class description
*/

export class SomeClass {
  /**
   * The field description
   */
  message: string;
}

I'm checking it on the TSDoc playground and see, that there is the summary for class, but there is no summary for its field我在TSDoc 操场上查看它,看到有 class 的摘要,但没有其领域的摘要

Is there a way to describe a field in typedoc?有没有办法在 typedoc 中描述一个字段?

The TSDoc playground is extremely limited - it will only parse and display the first doc comment it finds. TSDoc 游乐场非常有限——它只会解析和显示它找到的第一个文档评论。 There is an open issue with others also being confused by its scope.其他人也对其 scope 感到困惑,这是一个未解决的问题。

TypeDoc is not the same thing as TSDoc. TypeDoc 与 TSDoc 不同。 TSDoc is a doc comment standard that will eventually be adopted by TypeDoc, whereas TypeDoc is a documentation generator. TSDoc 是一个文档注释标准,最终将被 TypeDoc 采用,而 TypeDoc 是一个文档生成器。 If you give TypeDoc that class (assuming it is exported), then it will properly document it as a class with a property message having the provided description.如果您向 TypeDoc 提供 class(假设它已导出),那么它将正确地将其记录为 class 并带有具有提供描述的属性message

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM