feat(website): show descriptions for @typeParam blocks (#8523)

This commit is contained in:
Suneet Tipirneni
2022-08-19 04:55:43 -04:00
committed by GitHub
parent 673262d38c
commit e475b63f25
18 changed files with 126 additions and 62 deletions

View File

@@ -1,4 +1,5 @@
import type { APIMessageComponentEmoji, APISelectMenuOption } from 'discord-api-types/v10';
import type { JSONEncodable } from '../../util/jsonEncodable';
import {
defaultValidator,
@@ -10,7 +11,7 @@ import {
/**
* Represents a option within a select menu component
*/
export class SelectMenuOptionBuilder {
export class SelectMenuOptionBuilder implements JSONEncodable<APISelectMenuOption> {
public constructor(public data: Partial<APISelectMenuOption> = {}) {}
/**
@@ -63,6 +64,9 @@ export class SelectMenuOptionBuilder {
return this;
}
/**
* {@inheritDoc JSONEncodable.toJSON}
*/
public toJSON(): APISelectMenuOption {
validateRequiredSelectMenuOptionParameters(this.data.label, this.data.value);
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions