mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 01:53:30 +01:00
feat(website): render tsdoc examples (#8494)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import type { ApiEnum, ApiModel } from '@microsoft/api-extractor-model';
|
||||
import { DocItem } from './DocItem';
|
||||
import { CommentNodeContainer } from './comment/CommentNodeContainer';
|
||||
import { nodeContainer } from './comment/CommentNodeContainer';
|
||||
import { genToken, TokenDocumentation } from '~/util/parse.server';
|
||||
|
||||
export interface EnumMemberData {
|
||||
@@ -18,9 +18,7 @@ export class DocEnum extends DocItem<ApiEnum> {
|
||||
this.members = item.members.map((member) => ({
|
||||
name: member.name,
|
||||
initializerTokens: member.initializerExcerpt?.spannedTokens.map((token) => genToken(this.model, token)) ?? [],
|
||||
summary: member.tsdocComment
|
||||
? new CommentNodeContainer(member.tsdocComment.summarySection, model, member).toJSON()
|
||||
: null,
|
||||
summary: member.tsdocComment ? nodeContainer(member.tsdocComment.summarySection, model, member) : null,
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user