From fef079f55aebf58b32a4f5fa2cfe7fc833732d3d Mon Sep 17 00:00:00 2001 From: crowlkats <13135287+crowlKats@users.noreply.github.com> Date: Sun, 9 Aug 2020 23:02:21 +0200 Subject: [PATCH] Force fix fmt --- src/discord.ts | 126 +++++++++++++++++-------------------------------- 1 file changed, 43 insertions(+), 83 deletions(-) diff --git a/src/discord.ts b/src/discord.ts index 5729e7b..2cbb3db 100644 --- a/src/discord.ts +++ b/src/discord.ts @@ -412,39 +412,27 @@ export namespace guild { export type Create = & Pick - & Partial< - NonNullable< - Pick< - Guild, - | "region" - | "icon" - | "verification_level" - | "default_message_notifications" - | "explicit_content_filter" - | "roles" - | "channels" - | "afk_channel_id" - | "afk_timeout" - | "system_channel_id" - > - > - >; + & Partial>>; export type Modify = & Partial - & Partial< - NonNullable< - Pick< - Guild, - | "owner_id" - | "splash" - | "banner" - | "rules_channel_id" - | "public_updates_channel_id" - | "preferred_locale" - > - > - >; + & Partial>>; export type BanDeleteMessageDays = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7; @@ -498,8 +486,7 @@ export namespace guild { } export interface MemberUpdateEvent - extends - Pick, + extends Pick, Partial> { guild_id: Snowflake; } @@ -531,9 +518,7 @@ export namespace guildMember { after?: Snowflake; } - export type MinimalGuildMember = Partial< - Pick - >; + export type MinimalGuildMember = Partial>; export interface Add extends MinimalGuildMember { access_token: string; @@ -571,12 +556,7 @@ export namespace integration { export type Create = Pick; - export type Modify = Partial< - Pick< - Integration, - "expire_behavior" | "expire_grace_period" | "enable_emoticons" - > - >; + export type Modify = Partial>; } export namespace invite { @@ -599,40 +579,30 @@ export namespace invite { created_at: ISO8601; } - export interface Create - extends - Partial< - Pick< - MetadataInvite, - "max_age" | "max_uses" | "temporary" | "target_user_type" - > - > { + export interface Create extends Partial> { unique?: boolean; target_user?: Snowflake; } export type VanityURL = Pick; - export interface CreateEvent extends - Pick< - MetadataInvite, - | "code" - | "created_at" - | "inviter" - | "max_age" - | "max_uses" - | "target_user" - | "target_user_type" - | "temporary" - | "uses" - > { + export interface CreateEvent extends Pick { channel_id: Snowflake; guild_id: Snowflake; } export type DeleteEvent = & Pick - & Partial>; + & Partial>; } export namespace message { @@ -715,9 +685,7 @@ export namespace message { allowed_mentions?: AllowedMentions; } - export type Edit = Partial< - Pick & Pick - >; + export type Edit = Partial & Pick>; export type DeleteEvent = Pick; @@ -732,10 +700,8 @@ export namespace message { export type ReactionRemoveEvent = Omit; - export type ReactionRemoveAllEvent = Omit< - ReactionRemoveEvent, - "emoji" | "user_id" - >; + export type ReactionRemoveAllEvent = Omit; export type ReactionRemoveEmojiEvent = Omit; } @@ -780,10 +746,8 @@ export namespace role { mentionable: boolean; } - export type Create = Pick< - Role, - "name" | "permissions" | "color" | "hoist" | "mentionable" - >; + export type Create = Pick; export type ModifyPosition = Pick; @@ -882,11 +846,9 @@ export namespace webhook { export type Create = & NonNullable> - & Required>; + & Required>; - export type Modify = Partial< - NonNullable> - >; + export type Modify = Partial>>; export interface ExecuteParams { wait?: boolean; @@ -898,9 +860,7 @@ export namespace webhook { embeds?: embed.Embed[]; } - export type UpdateEvent = NonNullable< - Pick - >; + export type UpdateEvent = NonNullable>; } export namespace gateway { @@ -924,8 +884,8 @@ export namespace gateway { t: T; } - export type SpecificEventPayload = T extends - keyof Events ? EventPayload + export type SpecificEventPayload = T extends keyof Events + ? EventPayload : never; export interface OpPayload {