mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-02 04:56:07 +00:00
fix: types
This commit is contained in:
parent
b9117f5524
commit
1e9286c999
@ -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<T>(array: T[], chunks: number): T[][] {
|
||||
let index = 0;
|
||||
let resIndex = 0;
|
||||
const result = Array(Math.ceil(array.length / chunks));
|
||||
const result = new Array<T[]>(Math.ceil(array.length / chunks));
|
||||
|
||||
while (index < array.length) {
|
||||
result[resIndex] = array.slice(index, (index += chunks));
|
||||
|
Loading…
x
Reference in New Issue
Block a user