mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 09:20:08 +00:00
docs(helpers,types): add discord doc links & remove leftover comments (#2223)
* deno fmt * fix TODO comments and commented code * revert changes to template * remove reference Co-authored-by: ITOH <to@itoh.at>
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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<T> = {
|
||||
: never;
|
||||
};
|
||||
|
||||
// export type Optionalize<T> = T extends object ?
|
||||
// & {
|
||||
// [K in KeysWithUndefined<T>]?: Optionalize<T[K]>;
|
||||
// }
|
||||
// & {
|
||||
// [K in Exclude<keyof T, KeysWithUndefined<T>>]: Optionalize<T[K]>;
|
||||
// }
|
||||
// : T;
|
||||
|
||||
// export type KeysWithUndefined<T> = {
|
||||
// [K in keyof T]-?: (undefined | null) extends T[K] ? K : never;
|
||||
// }[keyof T];
|
||||
|
||||
// export type Optionalize<T> = (
|
||||
// & {
|
||||
// [K in KeysWithUndefined<T>]?: Optionalize<T[K]>;
|
||||
// }
|
||||
// & {
|
||||
// [K in Exclude<keyof T, KeysWithUndefined<T>>]: (
|
||||
// // deno-lint-ignore ban-types
|
||||
// T[K] extends object ? Object extends Pick<T[K], keyof T[K]> ? T[K] : Optionalize<T[K]> : T[K]
|
||||
// );
|
||||
// }
|
||||
// );
|
||||
|
||||
// export type KeysWithUndefined<T> = {
|
||||
// [K in keyof T]-?: undefined extends T[K] ? K
|
||||
// : null extends T[K] ? K
|
||||
// : never;
|
||||
// }[keyof T];
|
||||
|
||||
// export type Optionalize<T> = T extends object ? (
|
||||
// & {
|
||||
// [K in KeysWithUndefined<T>]?: T[K] extends Collection<any, any> ? T[K]
|
||||
// : T[K] extends any[] ? T[K]
|
||||
// : Optionalize<T[K]>;
|
||||
// }
|
||||
// & {
|
||||
// [K in Exclude<keyof T, KeysWithUndefined<T>>]: T[K] extends object ? Object extends Pick<T[K], keyof T[K]> ? T[K]
|
||||
// : T[K] extends Collection<any, any> ? T[K]
|
||||
// : T[K] extends any[] ? T[K]
|
||||
// : Optionalize<T[K]>
|
||||
// : T[K];
|
||||
// }
|
||||
// )
|
||||
// : T;
|
||||
|
||||
export type Id<T> = T extends infer U ? {
|
||||
[K in keyof U]: U[K];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user