mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 00:53:31 +01:00
feat(website): add extends clauses, enum members and automatic -types links (#8270)
* feat(website): add extends clauses, enum members and automatic -types links * chore: remove vscode settings * refactor: remove util file
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
import type { ApiEnum, ApiModel } from '@microsoft/api-extractor-model';
|
||||
import { DocItem } from './DocItem';
|
||||
import { genToken, resolveDocComment, TokenDocumentation } from '~/util/parse.server';
|
||||
|
||||
export interface EnumMemberData {
|
||||
name: string;
|
||||
initializerTokens: TokenDocumentation[];
|
||||
summary: string | null;
|
||||
}
|
||||
|
||||
export class DocEnum extends DocItem<ApiEnum> {
|
||||
@@ -13,6 +16,8 @@ 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: resolveDocComment(member),
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user