Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types: fix duplicate props in merged interfaces #10160

Merged
merged 2 commits into from
Mar 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 19 additions & 24 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ export class BaseGuildEmoji extends Emoji {
}

// tslint:disable-next-line no-empty-interface
export interface BaseGuildTextChannel extends TextBasedChannelFields<true>, GuildChannel {}
export interface BaseGuildTextChannel extends TextBasedChannelFields<true> {}
export class BaseGuildTextChannel extends GuildChannel {
protected constructor(guild: Guild, data?: RawGuildChannelData, client?: Client<true>, immediatePatch?: boolean);
public defaultAutoArchiveDuration?: ThreadAutoArchiveDuration;
Expand All @@ -678,9 +678,7 @@ export class BaseGuildTextChannel extends GuildChannel {
}

// tslint:disable-next-line no-empty-interface
export interface BaseGuildVoiceChannel
extends Omit<TextBasedChannelFields<true>, 'lastPinTimestamp' | 'lastPinAt'>,
GuildChannel {}
export interface BaseGuildVoiceChannel extends Omit<TextBasedChannelFields<true>, 'lastPinTimestamp' | 'lastPinAt'> {}
export class BaseGuildVoiceChannel extends GuildChannel {
public constructor(guild: Guild, data?: RawGuildChannelData);
public bitrate: number;
Expand Down Expand Up @@ -1310,10 +1308,9 @@ export interface ResolvedFile {
// tslint:disable-next-line no-empty-interface
export interface DMChannel
extends Omit<
TextBasedChannelFields<false>,
'bulkDelete' | 'fetchWebhooks' | 'createWebhook' | 'setRateLimitPerUser' | 'setNSFW'
>,
BaseChannel {}
TextBasedChannelFields<false>,
'bulkDelete' | 'fetchWebhooks' | 'createWebhook' | 'setRateLimitPerUser' | 'setNSFW'
> {}
export class DMChannel extends BaseChannel {
private constructor(client: Client<true>, data?: RawDMChannelData);
public flags: Readonly<ChannelFlagsBitField>;
Expand Down Expand Up @@ -1593,7 +1590,7 @@ export class GuildMemberFlagsBitField extends BitField<GuildMemberFlagsString> {
public static resolve(bit?: BitFieldResolvable<GuildMemberFlagsString, GuildMemberFlags>): number;
}

export interface GuildMember extends PartialTextBasedChannelFields<false>, Base {}
export interface GuildMember extends PartialTextBasedChannelFields<false> {}
export class GuildMember extends Base {
private constructor(client: Client<true>, data: RawGuildMemberData, guild: Guild);
private _roles: Snowflake[];
Expand Down Expand Up @@ -2499,18 +2496,17 @@ export interface DefaultReactionEmoji {

export interface ThreadOnlyChannel
extends Omit<
TextBasedChannelFields,
| 'send'
| 'lastMessage'
| 'lastPinAt'
| 'bulkDelete'
| 'sendTyping'
| 'createMessageCollector'
| 'awaitMessages'
| 'createMessageComponentCollector'
| 'awaitMessageComponent'
>,
GuildChannel {}
TextBasedChannelFields,
| 'send'
| 'lastMessage'
| 'lastPinAt'
| 'bulkDelete'
| 'sendTyping'
| 'createMessageCollector'
| 'awaitMessages'
| 'createMessageComponentCollector'
| 'awaitMessageComponent'
> {}
export abstract class ThreadOnlyChannel extends GuildChannel {
public type: ChannelType.GuildForum | ChannelType.GuildMedia;
public threads: GuildForumThreadManager;
Expand Down Expand Up @@ -3176,8 +3172,7 @@ export interface PrivateThreadChannel extends ThreadChannel<false> {

// tslint:disable-next-line no-empty-interface
export interface ThreadChannel<ThreadOnly extends boolean = boolean>
extends Omit<TextBasedChannelFields<true>, 'fetchWebhooks' | 'createWebhook' | 'setNSFW'>,
BaseChannel {}
extends Omit<TextBasedChannelFields<true>, 'fetchWebhooks' | 'createWebhook' | 'setNSFW'> {}
export class ThreadChannel<ThreadOnly extends boolean = boolean> extends BaseChannel {
private constructor(guild: Guild, data?: RawThreadChannelData, client?: Client<true>);
public archived: boolean | null;
Expand Down Expand Up @@ -3274,7 +3269,7 @@ export class Typing extends Base {
}

// tslint:disable-next-line no-empty-interface
export interface User extends PartialTextBasedChannelFields<false>, Base {}
export interface User extends PartialTextBasedChannelFields<false> {}
export class User extends Base {
protected constructor(client: Client<true>, data: RawUserData);
private _equals(user: APIUser): boolean;
Expand Down
Loading