diff --git a/types/discord.ts b/types/discord.ts index 4f7e428b3..f99eb02b7 100644 --- a/types/discord.ts +++ b/types/discord.ts @@ -933,8 +933,7 @@ export interface DiscordActivitySecrets { match?: string; } -// https://github.com/discord/discord-api-docs/pull/2219 -// TODO: add documentation link +/** https://discord.com/developers/docs/topics/gateway#activity-object-activity-buttons */ export interface DiscordActivityButton { /** The text shown on the button (1-32 characters) */ label: string; diff --git a/types/shared.ts b/types/shared.ts index ba252f615..daa4e11f0 100644 --- a/types/shared.ts +++ b/types/shared.ts @@ -249,7 +249,7 @@ export enum PremiumTiers { Tier3, } -// TODO: add resource link +/** https://discord.com/developers/docs/resources/guild#guild-object-guild-nsfw-level */ export enum GuildNsfwLevel { Default, Explicit, @@ -1296,53 +1296,6 @@ export type Camelize = { : never; }; -// export type Optionalize = T extends object ? -// & { -// [K in KeysWithUndefined]?: Optionalize; -// } -// & { -// [K in Exclude>]: Optionalize; -// } -// : T; - -// export type KeysWithUndefined = { -// [K in keyof T]-?: (undefined | null) extends T[K] ? K : never; -// }[keyof T]; - -// export type Optionalize = ( -// & { -// [K in KeysWithUndefined]?: Optionalize; -// } -// & { -// [K in Exclude>]: ( -// // deno-lint-ignore ban-types -// T[K] extends object ? Object extends Pick ? T[K] : Optionalize : T[K] -// ); -// } -// ); - -// export type KeysWithUndefined = { -// [K in keyof T]-?: undefined extends T[K] ? K -// : null extends T[K] ? K -// : never; -// }[keyof T]; - -// export type Optionalize = T extends object ? ( -// & { -// [K in KeysWithUndefined]?: T[K] extends Collection ? T[K] -// : T[K] extends any[] ? T[K] -// : Optionalize; -// } -// & { -// [K in Exclude>]: T[K] extends object ? Object extends Pick ? T[K] -// : T[K] extends Collection ? T[K] -// : T[K] extends any[] ? T[K] -// : Optionalize -// : T[K]; -// } -// ) -// : T; - export type Id = T extends infer U ? { [K in keyof U]: U[K]; }