Angular 如何在compodoc+;角2
我已经开始使用compodoc来记录我的应用程序,我正在努力获得干净的代码,同时对文档OpenWeatherAPI接口进行注释 我已经尝试了通用的Angular 如何在compodoc+;角2,angular,typescript,documentation-generation,compodoc,Angular,Typescript,Documentation Generation,Compodoc,我已经开始使用compodoc来记录我的应用程序,我正在努力获得干净的代码,同时对文档OpenWeatherAPI接口进行注释 我已经尝试了通用的@propertyJSDoc标记,但是它不能与compodoc一起工作,所以要使它按预期工作,我需要编写如下代码 /** * Weather information */ interface CityWeather { /** * Weather condition id */ id: number; /** * G
@property
JSDoc标记,但是它不能与compodoc一起工作,所以要使它按预期工作,我需要编写如下代码
/**
* Weather information
*/
interface CityWeather {
/**
* Weather condition id
*/
id: number;
/**
* Group of weather parameters (Rain, Snow, Extreme etc.)
*/
main: string;
/**
* Weather condition within the group
*/
description: string;
/**
* Weather icon id
*/
icon: string;
}
我希望注释只出现在代码的开头,而不是每个属性上面,就像旧的JSDoc@property{type}[name]
像下面这样的事情是可能的吗?或者是比上面更干净的方法
/**
* Weather information
*
* @property id Weather condition id
* @property main Group of weather parameters (Rain, Snow, Extreme etc.)
* @property description Weather condition within the group
* @property icon Weather icon id
*/
interface CityWeather {
id: number;
main: string;
description: string;
icon: string;
}
我这边的小编辑
注释上不需要换行,您可以将所有内容都放在一行中,如下所示:
/** Weather information */
export interface CityWeather {
/** Weather condition id */
id: number;
/** Group of weather parameters (Rain, Snow, Extreme etc.) */
main: string;
/** Weather condition within the group */
description: string;
/** Weather icon id */
icon: string;
}
这目前不受支持,但在compodoc github问题上已经做了一些修改。似乎是对的,我在那篇文章中添加了一些信息,非常感谢您的见解。