style: run prettier (#9041)

This commit is contained in:
Almeida
2023-01-12 08:23:02 +00:00
committed by GitHub
parent 8dfd0037b5
commit 2798ba1eb3
6 changed files with 9 additions and 7 deletions

View File

@@ -14,7 +14,7 @@ const allowedChannelTypes = [
ChannelType.GuildForum,
] as const;
export type ApplicationCommandOptionAllowedChannelTypes = typeof allowedChannelTypes[number];
export type ApplicationCommandOptionAllowedChannelTypes = (typeof allowedChannelTypes)[number];
const channelTypesPredicate = s.array(s.union(...allowedChannelTypes.map((type) => s.literal(type))));

View File

@@ -4620,8 +4620,8 @@ export type CacheConstructors = {
// Narrowing the type of `manager.name` doesn't propagate type information to `holds` and the return type.
export type CacheFactory = (
manager: CacheConstructors[keyof Caches],
holds: Caches[typeof manager['name']][1],
) => typeof manager['prototype'] extends DataManager<infer K, infer V, any> ? Collection<K, V> : never;
holds: Caches[(typeof manager)['name']][1],
) => (typeof manager)['prototype'] extends DataManager<infer K, infer V, any> ? Collection<K, V> : never;
export type CacheWithLimitsOptions = {
[K in keyof Caches]?: Caches[K][0]['prototype'] extends DataManager<infer K, infer V, any>

View File

@@ -420,7 +420,7 @@ export const TimestampStyles = {
/**
* The possible values, see {@link TimestampStyles} for more information
*/
export type TimestampStylesString = typeof TimestampStyles[keyof typeof TimestampStyles];
export type TimestampStylesString = (typeof TimestampStyles)[keyof typeof TimestampStyles];
/**
* An enum with all the available faces from Discord's native slash commands

View File

@@ -46,9 +46,9 @@ export const ALLOWED_EXTENSIONS = ['webp', 'png', 'jpg', 'jpeg', 'gif'] as const
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];
export type ImageSize = typeof ALLOWED_SIZES[number];
export type ImageExtension = (typeof ALLOWED_EXTENSIONS)[number];
export type StickerExtension = (typeof ALLOWED_STICKER_EXTENSIONS)[number];
export type ImageSize = (typeof ALLOWED_SIZES)[number];
export const OverwrittenMimeTypes = {
// https://github.com/discordjs/discord.js/issues/8557

View File

@@ -46,6 +46,7 @@ vi.mock('node:worker_threads', async () => {
return {
parentPort: new MockParentPort(),
isMainThread: false,
workerData: {},
};
});

View File

@@ -135,6 +135,7 @@ vi.mock('node:worker_threads', async () => {
return {
Worker: MockWorker,
workerData: {},
};
});