fix(website): misc improvements (#9940)

* refactor: use tokenRange for typeParams in heritage

* fix: correct type param replacement

* fix: ae config, link builtin in summary, `: | T` => `: T`, mainlib tsdoc

* fix: requested changes and tests

* chore: better deprecation messages and code cleanup

* fix: cleanup optional chainings

---------

Co-authored-by: Almeida <almeidx@pm.me>
This commit is contained in:
Qjuh
2023-11-13 09:55:23 +01:00
committed by GitHub
parent 2d63d93558
commit b79351ba99
7 changed files with 134 additions and 97 deletions

View File

@@ -991,7 +991,7 @@ export class Client<Ready extends boolean = boolean> extends BaseClient {
public fetchVoiceRegions(): Promise<Collection<string, VoiceRegion>>;
public fetchSticker(id: Snowflake): Promise<Sticker>;
public fetchStickerPacks(): Promise<Collection<Snowflake, StickerPack>>;
/** @deprecated Use {@link fetchStickerPacks} instead. */
/** @deprecated Use {@link Client#fetchStickerPacks} instead. */
public fetchPremiumStickerPacks(): ReturnType<Client['fetchStickerPacks']>;
public fetchWebhook(id: Snowflake, token?: string): Promise<Webhook>;
public fetchGuildWidget(guild: GuildResolvable): Promise<Widget>;
@@ -1870,7 +1870,7 @@ export class BaseInteraction<Cached extends CacheType = CacheType> extends Base
public isMessageContextMenuCommand(): this is MessageContextMenuCommandInteraction<Cached>;
public isModalSubmit(): this is ModalSubmitInteraction<Cached>;
public isUserContextMenuCommand(): this is UserContextMenuCommandInteraction<Cached>;
/** @deprecated Use {@link isStringSelectMenu} instead. */
/** @deprecated Use {@link BaseInteraction#isStringSelectMenu} instead. */
public isSelectMenu(): this is StringSelectMenuInteraction<Cached>;
public isAnySelectMenu(): this is AnySelectMenuInteraction<Cached>;
public isStringSelectMenu(): this is StringSelectMenuInteraction<Cached>;
@@ -1957,12 +1957,12 @@ export class Invite extends Base {
public toJSON(): unknown;
public toString(): string;
public static InvitesPattern: RegExp;
/** @deprecated */
/** @deprecated Public Stage Instances don't exist anymore */
public stageInstance: InviteStageInstance | null;
public guildScheduledEvent: GuildScheduledEvent | null;
}
/** @deprecated */
/** @deprecated Public Stage Instances don't exist anymore */
export class InviteStageInstance extends Base {
private constructor(client: Client<true>, data: RawInviteStageInstance, channelId: Snowflake, guildId: Snowflake);
public channelId: Snowflake;
@@ -3065,7 +3065,7 @@ export class TeamMember extends Base {
private constructor(team: Team, data: RawTeamMemberData);
public team: Team;
public get id(): Snowflake;
/** @deprecated Use {@link role} instead. */
/** @deprecated Use {@link TeamMember#role} instead. */
public permissions: string[];
public membershipState: TeamMemberMembershipState;
public user: User;
@@ -3632,24 +3632,24 @@ export enum DiscordjsErrorCodes {
TokenMissing = 'TokenMissing',
ApplicationCommandPermissionsTokenMissing = 'ApplicationCommandPermissionsTokenMissing',
/** @deprecated */
/** @deprecated WebSocket errors are now handled in `@discordjs/ws` */
WSCloseRequested = 'WSCloseRequested',
/** @deprecated */
/** @deprecated WebSocket errors are now handled in `@discordjs/ws` */
WSConnectionExists = 'WSConnectionExists',
/** @deprecated */
/** @deprecated WebSocket errors are now handled in `@discordjs/ws` */
WSNotOpen = 'WSNotOpen',
/** @deprecated */
/** @deprecated No longer in use */
ManagerDestroyed = 'ManagerDestroyed',
BitFieldInvalid = 'BitFieldInvalid',
/** @deprecated */
/** @deprecated This error is now handled in `@discordjs/ws` */
ShardingInvalid = 'ShardingInvalid',
/** @deprecated */
/** @deprecated This error is now handled in `@discordjs/ws` */
ShardingRequired = 'ShardingRequired',
/** @deprecated */
/** @deprecated This error is now handled in `@discordjs/ws` */
InvalidIntents = 'InvalidIntents',
/** @deprecated */
/** @deprecated This error is now handled in `@discordjs/ws` */
DisallowedIntents = 'DisallowedIntents',
ShardingNoShards = 'ShardingNoShards',
ShardingInProcess = 'ShardingInProcess',
@@ -3669,29 +3669,29 @@ export enum DiscordjsErrorCodes {
InviteOptionsMissingChannel = 'InviteOptionsMissingChannel',
/** @deprecated */
/** @deprecated Button validation errors are now handled in `@discordjs/builders` */
ButtonLabel = 'ButtonLabel',
/** @deprecated */
/** @deprecated Button validation errors are now handled in `@discordjs/builders` */
ButtonURL = 'ButtonURL',
/** @deprecated */
/** @deprecated Button validation errors are now handled in `@discordjs/builders` */
ButtonCustomId = 'ButtonCustomId',
/** @deprecated */
/** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */
SelectMenuCustomId = 'SelectMenuCustomId',
/** @deprecated */
/** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */
SelectMenuPlaceholder = 'SelectMenuPlaceholder',
/** @deprecated */
/** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */
SelectOptionLabel = 'SelectOptionLabel',
/** @deprecated */
/** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */
SelectOptionValue = 'SelectOptionValue',
/** @deprecated */
/** @deprecated Select Menu validation errors are now handled in `@discordjs/builders` */
SelectOptionDescription = 'SelectOptionDescription',
InteractionCollectorError = 'InteractionCollectorError',
FileNotFound = 'FileNotFound',
/** @deprecated */
/** @deprecated No longer in use */
UserBannerNotFetched = 'UserBannerNotFetched',
UserNoDMChannel = 'UserNoDMChannel',
@@ -3702,16 +3702,16 @@ export enum DiscordjsErrorCodes {
ReqResourceType = 'ReqResourceType',
/** @deprecated */
/** @deprecated This error is now handled in `@discordjs/rest` */
ImageFormat = 'ImageFormat',
/** @deprecated */
/** @deprecated This error is now handled in `@discordjs/rest` */
ImageSize = 'ImageSize',
MessageBulkDeleteType = 'MessageBulkDeleteType',
MessageNonceType = 'MessageNonceType',
MessageContentType = 'MessageContentType',
/** @deprecated */
/** @deprecated No longer in use */
SplitMaxLen = 'SplitMaxLen',
BanResolveId = 'BanResolveId',
@@ -3747,14 +3747,14 @@ export enum DiscordjsErrorCodes {
EmojiType = 'EmojiType',
EmojiManaged = 'EmojiManaged',
MissingManageGuildExpressionsPermission = 'MissingManageGuildExpressionsPermission',
/** @deprecated Use {@link MissingManageGuildExpressionsPermission} instead. */
/** @deprecated Use {@link DiscordjsErrorCodes.MissingManageGuildExpressionsPermission} instead. */
MissingManageEmojisAndStickersPermission = 'MissingManageEmojisAndStickersPermission',
NotGuildSticker = 'NotGuildSticker',
ReactionResolveUser = 'ReactionResolveUser',
/** @deprecated */
/** @deprecated Not used anymore since the introduction of `GUILD_WEB_PAGE_VANITY_URL` feature */
VanityURL = 'VanityURL',
InviteResolveCode = 'InviteResolveCode',
@@ -3771,7 +3771,7 @@ export enum DiscordjsErrorCodes {
InteractionAlreadyReplied = 'InteractionAlreadyReplied',
InteractionNotReplied = 'InteractionNotReplied',
/** @deprecated */
/** @deprecated Not used anymore since ephemeral replies can now be deleted */
InteractionEphemeralReplied = 'InteractionEphemeralReplied',
CommandInteractionOptionNotFound = 'CommandInteractionOptionNotFound',
@@ -4801,7 +4801,7 @@ export interface AwaitReactionsOptions extends ReactionCollectorOptions {
}
export interface BanOptions {
/** @deprecated Use {@link deleteMessageSeconds} instead. */
/** @deprecated Use {@link BanOptions#deleteMessageSeconds} instead. */
deleteMessageDays?: number;
deleteMessageSeconds?: number;
reason?: string;
@@ -5001,7 +5001,7 @@ export interface ClientEvents {
typingStart: [typing: Typing];
userUpdate: [oldUser: User | PartialUser, newUser: User];
voiceStateUpdate: [oldState: VoiceState, newState: VoiceState];
/** @deprecated Use {@link webhooksUpdate} instead. */
/** @deprecated Use {@link ClientEvents#webhooksUpdate} instead. */
webhookUpdate: ClientEvents['webhooksUpdate'];
webhooksUpdate: [channel: TextChannel | NewsChannel | VoiceChannel | ForumChannel | MediaChannel];
interactionCreate: [interaction: Interaction];
@@ -5061,10 +5061,10 @@ export interface ClientUserEditOptions {
}
export interface CloseEvent {
/** @deprecated */
/** @deprecated Not used anymore since using {@link @discordjs/ws#WebSocketManager} internally */
wasClean: boolean;
code: number;
/** @deprecated */
/** @deprecated Not used anymore since using {@link @discordjs/ws#WebSocketManager} internally */
reason: string;
}
@@ -5390,11 +5390,11 @@ export interface FetchGuildScheduledEventSubscribersOptions {
withMember?: boolean;
}
interface FetchInviteOptions extends BaseFetchOptions {
export interface FetchInviteOptions extends BaseFetchOptions {
code: string;
}
interface FetchInvitesOptions {
export interface FetchInvitesOptions {
channelId?: GuildInvitableChannelResolvable;
cache?: boolean;
}