mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-13 10:03:31 +01:00
feat: add website documentation early mvp (#8183)
Co-authored-by: iCrawl <buechler.noel@outlook.com>
This commit is contained in:
25
packages/website/src/DocModel/DocEnum.ts
Normal file
25
packages/website/src/DocModel/DocEnum.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import type { ApiEnum, ApiModel } from '@microsoft/api-extractor-model';
|
||||
import { DocItem } from './DocItem';
|
||||
|
||||
export interface EnumMemberData {
|
||||
name: string;
|
||||
}
|
||||
|
||||
export class DocEnum extends DocItem<ApiEnum> {
|
||||
public readonly members: EnumMemberData[] = [];
|
||||
|
||||
public constructor(model: ApiModel, item: ApiEnum) {
|
||||
super(model, item);
|
||||
|
||||
this.members = item.members.map((member) => ({
|
||||
name: member.name,
|
||||
}));
|
||||
}
|
||||
|
||||
public override toJSON() {
|
||||
return {
|
||||
...super.toJSON(),
|
||||
members: this.members,
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user