refactor: Specify type for active array in upload process
This commit is contained in:
@@ -154,7 +154,7 @@ export default function Home() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const queue = [...chunks];
|
const queue = [...chunks];
|
||||||
const active = [];
|
const active: Promise<void>[] = [];
|
||||||
while (queue.length > 0 || active.length > 0) {
|
while (queue.length > 0 || active.length > 0) {
|
||||||
while (active.length < PARALLEL_UPLOADS && queue.length > 0) {
|
while (active.length < PARALLEL_UPLOADS && queue.length > 0) {
|
||||||
const task = queue.shift()!;
|
const task = queue.shift()!;
|
||||||
|
|||||||
Reference in New Issue
Block a user