From 799044d3f0b21721408b109a5184b017138d5cd4 Mon Sep 17 00:00:00 2001 From: Vlad Frangu Date: Sat, 20 Jul 2024 17:07:37 +0400 Subject: [PATCH] chore: ensure routes definitions emit correct paths to prevent a repeat of a bug --- deno/rest/v10/mod.ts | 4 ++-- deno/rest/v9/mod.ts | 4 ++-- rest/v10/index.ts | 4 ++-- rest/v9/index.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/deno/rest/v10/mod.ts b/deno/rest/v10/mod.ts index f7d6851ef..32e065185 100644 --- a/deno/rest/v10/mod.ts +++ b/deno/rest/v10/mod.ts @@ -988,7 +988,7 @@ export const Routes = { applicationEmoji(applicationId: Snowflake, emojiId: Snowflake) { return `/applications/${applicationId}/emojis/${emojiId}` as const; }, -}; +} satisfies Record `/${string}`>; export const StickerPackApplicationId = '710982414301790216'; @@ -1277,7 +1277,7 @@ export const CDNRoutes = { ) { return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const; }, -}; +} satisfies Record `/${string}`>; export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5; diff --git a/deno/rest/v9/mod.ts b/deno/rest/v9/mod.ts index 00d33bbce..0207584bb 100644 --- a/deno/rest/v9/mod.ts +++ b/deno/rest/v9/mod.ts @@ -997,7 +997,7 @@ export const Routes = { applicationEmoji(applicationId: Snowflake, emojiId: Snowflake) { return `/applications/${applicationId}/emojis/${emojiId}` as const; }, -}; +} satisfies Record `/${string}`>; export const StickerPackApplicationId = '710982414301790216'; @@ -1286,7 +1286,7 @@ export const CDNRoutes = { ) { return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const; }, -}; +} satisfies Record `/${string}`>; export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5; diff --git a/rest/v10/index.ts b/rest/v10/index.ts index 84791069a..10162cc70 100644 --- a/rest/v10/index.ts +++ b/rest/v10/index.ts @@ -988,7 +988,7 @@ export const Routes = { applicationEmoji(applicationId: Snowflake, emojiId: Snowflake) { return `/applications/${applicationId}/emojis/${emojiId}` as const; }, -}; +} satisfies Record `/${string}`>; export const StickerPackApplicationId = '710982414301790216'; @@ -1277,7 +1277,7 @@ export const CDNRoutes = { ) { return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const; }, -}; +} satisfies Record `/${string}`>; export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5; diff --git a/rest/v9/index.ts b/rest/v9/index.ts index 363aee41b..db8a9c56a 100644 --- a/rest/v9/index.ts +++ b/rest/v9/index.ts @@ -997,7 +997,7 @@ export const Routes = { applicationEmoji(applicationId: Snowflake, emojiId: Snowflake) { return `/applications/${applicationId}/emojis/${emojiId}` as const; }, -}; +} satisfies Record `/${string}`>; export const StickerPackApplicationId = '710982414301790216'; @@ -1286,7 +1286,7 @@ export const CDNRoutes = { ) { return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const; }, -}; +} satisfies Record `/${string}`>; export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5;