From 1e9286c999b5069ac0b02fccea61960c603b16f9 Mon Sep 17 00:00:00 2001 From: MARCROCK22 <57925328+MARCROCK22@users.noreply.github.com> Date: Tue, 2 Apr 2024 20:49:25 -0400 Subject: [PATCH] fix: types --- src/websocket/structures/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/websocket/structures/index.ts b/src/websocket/structures/index.ts index ba4590d..70c888a 100644 --- a/src/websocket/structures/index.ts +++ b/src/websocket/structures/index.ts @@ -13,7 +13,7 @@ export class DynamicBucket { queue: ((value?: unknown) => any)[] = []; used = 0; processing?: boolean; - refillsAt? = 0; + refillsAt?: number; timeoutId?: NodeJS.Timeout; constructor(public options: DynamicBucketOptions) {} @@ -76,7 +76,7 @@ export class DynamicBucket { static chunk(array: T[], chunks: number): T[][] { let index = 0; let resIndex = 0; - const result = Array(Math.ceil(array.length / chunks)); + const result = new Array(Math.ceil(array.length / chunks)); while (index < array.length) { result[resIndex] = array.slice(index, (index += chunks));