mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 18:13:29 +01:00
feat(website): parse tsdoc comments (#8386)
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import type { ApiItem, ApiModel } from '@microsoft/api-extractor-model';
|
||||
import type { DocNodeContainer } from '@microsoft/tsdoc';
|
||||
import { createCommentNode } from '.';
|
||||
import { CommentNode } from './CommentNode';
|
||||
|
||||
export class CommentNodeContainer<T extends DocNodeContainer = DocNodeContainer> extends CommentNode<DocNodeContainer> {
|
||||
public readonly nodes: CommentNode[];
|
||||
|
||||
public constructor(container: T, model: ApiModel, parentItem?: ApiItem) {
|
||||
super(container, model, parentItem);
|
||||
this.nodes = container.nodes.map((node) => createCommentNode(node, model, parentItem));
|
||||
}
|
||||
|
||||
public override toJSON() {
|
||||
return {
|
||||
...super.toJSON(),
|
||||
nodes: this.nodes.map((node) => node.toJSON()),
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user