Skip to content

Commit 799044d

Browse files
committed
chore: ensure routes definitions emit correct paths
to prevent a repeat of a bug
1 parent eb7b3d9 commit 799044d

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

deno/rest/v10/mod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ export const Routes = {
988988
applicationEmoji(applicationId: Snowflake, emojiId: Snowflake) {
989989
return `/applications/${applicationId}/emojis/${emojiId}` as const;
990990
},
991-
};
991+
} satisfies Record<string, (...args: unknown[]) => `/${string}`>;
992992

993993
export const StickerPackApplicationId = '710982414301790216';
994994

@@ -1277,7 +1277,7 @@ export const CDNRoutes = {
12771277
) {
12781278
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
12791279
},
1280-
};
1280+
} satisfies Record<string, (...args: unknown[]) => `/${string}`>;
12811281

12821282
export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5;
12831283

deno/rest/v9/mod.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ export const Routes = {
997997
applicationEmoji(applicationId: Snowflake, emojiId: Snowflake) {
998998
return `/applications/${applicationId}/emojis/${emojiId}` as const;
999999
},
1000-
};
1000+
} satisfies Record<string, (...args: unknown[]) => `/${string}`>;
10011001

10021002
export const StickerPackApplicationId = '710982414301790216';
10031003

@@ -1286,7 +1286,7 @@ export const CDNRoutes = {
12861286
) {
12871287
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
12881288
},
1289-
};
1289+
} satisfies Record<string, (...args: unknown[]) => `/${string}`>;
12901290

12911291
export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5;
12921292

rest/v10/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -988,7 +988,7 @@ export const Routes = {
988988
applicationEmoji(applicationId: Snowflake, emojiId: Snowflake) {
989989
return `/applications/${applicationId}/emojis/${emojiId}` as const;
990990
},
991-
};
991+
} satisfies Record<string, (...args: unknown[]) => `/${string}`>;
992992

993993
export const StickerPackApplicationId = '710982414301790216';
994994

@@ -1277,7 +1277,7 @@ export const CDNRoutes = {
12771277
) {
12781278
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
12791279
},
1280-
};
1280+
} satisfies Record<string, (...args: unknown[]) => `/${string}`>;
12811281

12821282
export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5;
12831283

rest/v9/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ export const Routes = {
997997
applicationEmoji(applicationId: Snowflake, emojiId: Snowflake) {
998998
return `/applications/${applicationId}/emojis/${emojiId}` as const;
999999
},
1000-
};
1000+
} satisfies Record<string, (...args: unknown[]) => `/${string}`>;
10011001

10021002
export const StickerPackApplicationId = '710982414301790216';
10031003

@@ -1286,7 +1286,7 @@ export const CDNRoutes = {
12861286
) {
12871287
return `/guilds/${guildId}/users/${userId}/banners/${guildMemberBanner}.${format}` as const;
12881288
},
1289-
};
1289+
} satisfies Record<string, (...args: unknown[]) => `/${string}`>;
12901290

12911291
export type DefaultUserAvatarAssets = 0 | 1 | 2 | 3 | 4 | 5;
12921292

0 commit comments

Comments
 (0)