mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
feat: add util package for generating search indices (#8571)
This commit is contained in:
28
packages/api-extractor-utils/src/tsdoc/CommentNode.ts
Normal file
28
packages/api-extractor-utils/src/tsdoc/CommentNode.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import type { DocNode, DocNodeKind } from '@microsoft/tsdoc';
|
||||
import type { DocBlockJSON } from './CommentBlock';
|
||||
import type { DocCodeSpanJSON } from './CommentCodeSpan';
|
||||
import type { DocNodeContainerJSON } from './CommentNodeContainer';
|
||||
import type { DocFencedCodeJSON } from './FencedCodeCommentNode';
|
||||
import type { DocLinkTagJSON } from './LinkTagCommentNode';
|
||||
import type { DocPlainTextJSON } from './PlainTextCommentNode';
|
||||
import type { DocCommentJSON } from './RootComment';
|
||||
|
||||
export interface DocNodeJSON {
|
||||
kind: DocNodeKind;
|
||||
}
|
||||
|
||||
export type AnyDocNodeJSON =
|
||||
| DocNodeJSON
|
||||
| DocPlainTextJSON
|
||||
| DocNodeContainerJSON
|
||||
| DocLinkTagJSON
|
||||
| DocFencedCodeJSON
|
||||
| DocBlockJSON
|
||||
| DocCommentJSON
|
||||
| DocCodeSpanJSON;
|
||||
|
||||
export function node(node: DocNode): DocNodeJSON {
|
||||
return {
|
||||
kind: node.kind as DocNodeKind,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user