mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
chore: use satisfies where applicable (#8884)
* chore: use satisfies where applicable * chore: remove unneeded eslint ignores Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -5,7 +5,7 @@ import type { RESTOptions } from '../REST.js';
|
||||
|
||||
export const DefaultUserAgent = `DiscordBot (https://discord.js.org, [VI]{{inject}}[/VI])`;
|
||||
|
||||
export const DefaultRestOptions: Required<RESTOptions> = {
|
||||
export const DefaultRestOptions = {
|
||||
get agent() {
|
||||
return new Agent({
|
||||
connect: {
|
||||
@@ -28,7 +28,7 @@ export const DefaultRestOptions: Required<RESTOptions> = {
|
||||
hashSweepInterval: 14_400_000, // 4 Hours
|
||||
hashLifetime: 86_400_000, // 24 Hours
|
||||
handlerSweepInterval: 3_600_000, // 1 Hour
|
||||
};
|
||||
} as const satisfies Required<RESTOptions>;
|
||||
|
||||
/**
|
||||
* The events that the REST manager emits
|
||||
@@ -42,9 +42,9 @@ export const enum RESTEvents {
|
||||
Response = 'response',
|
||||
}
|
||||
|
||||
export const ALLOWED_EXTENSIONS = ['webp', 'png', 'jpg', 'jpeg', 'gif'] as const;
|
||||
export const ALLOWED_STICKER_EXTENSIONS = ['png', 'json'] as const;
|
||||
export const ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096] as const;
|
||||
export const ALLOWED_EXTENSIONS = ['webp', 'png', 'jpg', 'jpeg', 'gif'] as const satisfies readonly string[];
|
||||
export const ALLOWED_STICKER_EXTENSIONS = ['png', 'json'] as const satisfies readonly string[];
|
||||
export const ALLOWED_SIZES = [16, 32, 64, 128, 256, 512, 1_024, 2_048, 4_096] as const satisfies readonly number[];
|
||||
|
||||
export type ImageExtension = typeof ALLOWED_EXTENSIONS[number];
|
||||
export type StickerExtension = typeof ALLOWED_STICKER_EXTENSIONS[number];
|
||||
|
||||
Reference in New Issue
Block a user