Skip to content

Commit

Permalink
style: run prettier (#9041)
Browse files Browse the repository at this point in the history
  • Loading branch information
almeidx committed Jan 12, 2023
1 parent 8dfd003 commit 2798ba1
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
Expand Up @@ -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))));

Expand Down
4 changes: 2 additions & 2 deletions packages/discord.js/typings/index.d.ts
Expand Up @@ -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>
Expand Down
2 changes: 1 addition & 1 deletion packages/formatters/src/formatters.ts
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions packages/rest/src/lib/utils/constants.ts
Expand Up @@ -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
Expand Down
Expand Up @@ -46,6 +46,7 @@ vi.mock('node:worker_threads', async () => {
return {
parentPort: new MockParentPort(),
isMainThread: false,
workerData: {},
};
});

Expand Down
Expand Up @@ -135,6 +135,7 @@ vi.mock('node:worker_threads', async () => {

return {
Worker: MockWorker,
workerData: {},
};
});

Expand Down

1 comment on commit 2798ba1

@vercel
Copy link

@vercel vercel bot commented on 2798ba1 Jan 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.