mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19: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:
@@ -34,7 +34,7 @@ export interface BaseBrokerOptions {
|
||||
/**
|
||||
* Default broker options
|
||||
*/
|
||||
export const DefaultBrokerOptions: Required<BaseBrokerOptions> = {
|
||||
export const DefaultBrokerOptions = {
|
||||
name: randomBytes(20).toString('hex'),
|
||||
maxChunk: 10,
|
||||
blockTimeout: 5_000,
|
||||
@@ -43,7 +43,7 @@ export const DefaultBrokerOptions: Required<BaseBrokerOptions> = {
|
||||
return Buffer.from(encoded.buffer, encoded.byteOffset, encoded.byteLength);
|
||||
},
|
||||
decode: (data): unknown => decode(data),
|
||||
};
|
||||
} as const satisfies Required<BaseBrokerOptions>;
|
||||
|
||||
export type ToEventMap<
|
||||
TRecord extends Record<string, any>,
|
||||
|
||||
@@ -21,10 +21,10 @@ export interface RPCRedisBrokerOptions extends RedisBrokerOptions {
|
||||
/**
|
||||
* Default values used for the {@link RPCRedisBrokerOptions}
|
||||
*/
|
||||
export const DefaultRPCRedisBrokerOptions: Required<Omit<RPCRedisBrokerOptions, 'redisClient'>> = {
|
||||
export const DefaultRPCRedisBrokerOptions = {
|
||||
...DefaultBrokerOptions,
|
||||
timeout: 5_000,
|
||||
};
|
||||
} as const satisfies Required<Omit<RPCRedisBrokerOptions, 'redisClient'>>;
|
||||
|
||||
/**
|
||||
* RPC broker powered by Redis
|
||||
|
||||
Reference in New Issue
Block a user