From 1626dded5b1f7345371fe6001ddbb45d41031635 Mon Sep 17 00:00:00 2001 From: Rodry <38259440+ImRodry@users.noreply.github.com> Date: Fri, 24 Dec 2021 10:58:50 +0000 Subject: [PATCH] types(CategoryChannel): fix createChannel return type (#7138) --- typings/index.d.ts | 6 +----- typings/index.test-d.ts | 6 +++--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/typings/index.d.ts b/typings/index.d.ts index 319aca3c0..9fcaaf15b 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -509,11 +509,7 @@ export class CategoryChannel extends GuildChannel { name: string, options: CategoryCreateChannelOptions & { type: 'GUILD_STORE' | ChannelTypes.GUILD_STORE }, ): Promise; - - public createChannel( - name: string, - options?: CategoryCreateChannelOptions, - ): Promise>; + public createChannel(name: string, options?: CategoryCreateChannelOptions): Promise; } export type CategoryChannelResolvable = Snowflake | CategoryChannel; diff --git a/typings/index.test-d.ts b/typings/index.test-d.ts index e60be8225..ccfbc3a3f 100644 --- a/typings/index.test-d.ts +++ b/typings/index.test-d.ts @@ -857,10 +857,10 @@ declare const categoryChannel: CategoryChannel; expectType>(categoryChannel.createChannel('name', { type: 'GUILD_VOICE' })); expectType>(categoryChannel.createChannel('name', { type: 'GUILD_TEXT' })); expectType>(categoryChannel.createChannel('name', { type: 'GUILD_NEWS' })); - expectDeprecated(categoryChannel.createChannel('name', { type: 'GUILD_STORE' })); + expectType>(categoryChannel.createChannel('name', { type: 'GUILD_STORE' })); expectType>(categoryChannel.createChannel('name', { type: 'GUILD_STAGE_VOICE' })); - expectType>>(categoryChannel.createChannel('name', {})); - expectType>>(categoryChannel.createChannel('name')); + expectType>(categoryChannel.createChannel('name', {})); + expectType>(categoryChannel.createChannel('name')); } declare const guildChannelManager: GuildChannelManager;