Skip to content

Commit bcfac40

Browse files
committed
chore: remove @ts-expect-errors
1 parent de3f24a commit bcfac40

File tree

3 files changed

+0
-4
lines changed

3 files changed

+0
-4
lines changed

packages/builders/__tests__/components/button.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ describe('Button Components', () => {
5151
}).not.toThrowError();
5252

5353
expect(() => {
54-
// @ts-expect-error: discord-api-types.
5554
const button = buttonComponent().setSKUId('123456789012345678').setStyle(ButtonStyle.Premium);
5655
button.toJSON();
5756
}).not.toThrowError();

packages/builders/src/components/Assertions.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ export function validateRequiredButtonParameters(
8484
skuId?: string,
8585
url?: string,
8686
) {
87-
// @ts-expect-error discord-api-types.
8887
if (style === ButtonStyle.Premium) {
8988
if (!skuId) {
9089
throw new RangeError('Premium buttons must have an SKU id.');

packages/builders/src/components/button/Button.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ export class ButtonBuilder extends ComponentBuilder<APIButtonComponent> {
9797
* @param skuId - The SKU id to use
9898
*/
9999
public setSKUId(skuId: Snowflake) {
100-
// @ts-expect-error discord-api-types.
101100
(this.data as APIButtonComponentWithSKUId).sku_id = skuId;
102101
return this;
103102
}
@@ -141,7 +140,6 @@ export class ButtonBuilder extends ComponentBuilder<APIButtonComponent> {
141140
(this.data as Exclude<APIButtonComponent, APIButtonComponentWithSKUId>).label,
142141
(this.data as Exclude<APIButtonComponent, APIButtonComponentWithSKUId>).emoji,
143142
(this.data as APIButtonComponentWithCustomId).custom_id,
144-
// @ts-expect-error discord-api-types.
145143
(this.data as APIButtonComponentWithSKUId).sku_id,
146144
(this.data as APIButtonComponentWithURL).url,
147145
);

0 commit comments

Comments
 (0)