feat(website): parse tsdoc comments (#8386)

This commit is contained in:
Suneet Tipirneni
2022-07-29 04:46:17 -04:00
committed by GitHub
parent 26556390a3
commit 33113614e0
13 changed files with 253 additions and 13 deletions

View File

@@ -0,0 +1,22 @@
import type { ApiItem, ApiModel } from '@microsoft/api-extractor-model';
import type { DocNode } from '@microsoft/tsdoc';
export class CommentNode<T extends DocNode = DocNode> {
public readonly node: T;
public readonly kind: string;
public readonly model: ApiModel;
public readonly parentItem: ApiItem | null;
public constructor(node: T, model: ApiModel, parentItem?: ApiItem) {
this.node = node;
this.kind = node.kind;
this.model = model;
this.parentItem = parentItem ?? null;
}
public toJSON() {
return {
kind: this.kind,
};
}
}