/**
* Interface of props of the Component
*/
export interface ComponentProps {
/**
* Name of sth
*/
name: string,
/**
* happening on click component
*/
onClick: () => void
}
/**
* @category Component
*/
export function Component({ name, onClick }: ComponentProps) {
(...)
}
当我通过 typedoc 生成文档时,我得到了两页:
Component
页面,其道具表示为 __namedParameters: ComponentProps
(其中 ComponentProps
已链接,这是可以的)ComponentProps
包含类型和名称列表的页面我可以以某种方式在
Component
页面上显示/列出带有类型的道具吗?
我认为这是不可能的。 TypeDoc 在其自己的页面中生成每个函数/变量/类型。这通常是 API 文档的结构方式。您应该能够在生成的模块页面中看到它们的索引。