mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
style: run prettier (#9041)
This commit is contained in:
@@ -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))));
|
||||
|
||||
|
||||
4
packages/discord.js/typings/index.d.ts
vendored
4
packages/discord.js/typings/index.d.ts
vendored
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -46,6 +46,7 @@ vi.mock('node:worker_threads', async () => {
|
||||
return {
|
||||
parentPort: new MockParentPort(),
|
||||
isMainThread: false,
|
||||
workerData: {},
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -135,6 +135,7 @@ vi.mock('node:worker_threads', async () => {
|
||||
|
||||
return {
|
||||
Worker: MockWorker,
|
||||
workerData: {},
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user