mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-14 10:33:30 +01:00
types: use wrapper utilities (#9945)
* types: use `Awaitable<T>` instead of `Promise<T> | T` * types: use `JSONEncodable<T>` over raw definition --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { Readable } from 'node:stream';
|
||||
import type { ReadableStream } from 'node:stream/web';
|
||||
import type { Collection } from '@discordjs/collection';
|
||||
import type { Awaitable } from '@discordjs/util';
|
||||
import type { Agent, Dispatcher, RequestInit, BodyInit, Response } from 'undici';
|
||||
import type { IHandler } from '../interfaces/Handler.js';
|
||||
|
||||
@@ -183,7 +184,7 @@ export interface RateLimitData {
|
||||
/**
|
||||
* A function that determines whether the rate limit hit should throw an Error
|
||||
*/
|
||||
export type RateLimitQueueFilter = (rateLimitData: RateLimitData) => Promise<boolean> | boolean;
|
||||
export type RateLimitQueueFilter = (rateLimitData: RateLimitData) => Awaitable<boolean>;
|
||||
|
||||
export interface APIRequest {
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user