From 4a7d49bb55d790ed85f5dbbe8acebdd5657deeaa Mon Sep 17 00:00:00 2001 From: Kristaps Fabians Geikins Date: Thu, 17 Oct 2024 16:56:26 +0300 Subject: [PATCH] linter fix --- packages/server/modules/core/utils/chunking.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/server/modules/core/utils/chunking.ts b/packages/server/modules/core/utils/chunking.ts index cfbc44a15..a6e9871c2 100644 --- a/packages/server/modules/core/utils/chunking.ts +++ b/packages/server/modules/core/utils/chunking.ts @@ -23,15 +23,15 @@ export const estimateStringByteSize = (str: string) => str.length export const estimateStringMegabyteSize = (str: string) => estimateStringByteSize(str) / 1_000_000 -export const chunkInsertionObjectArray = ({ +export const chunkInsertionObjectArray = ({ objects, chunkSizeLimitMb, chunkLengthLimit }: { chunkSizeLimitMb: number chunkLengthLimit: number - objects: InsertionObject[] -}): InsertionObject[][] => { + objects: O[] +}): O[][] => { if (chunkLengthLimit < 1) throw new ArgumentError('Chunks must have a length limit > 1') if (chunkSizeLimitMb <= 0) @@ -39,8 +39,8 @@ export const chunkInsertionObjectArray = ({ let currentChunkSize = 0 let currentChunkLength = 0 - const chunkedObjects: InsertionObject[][] = [] - let currentBatch: InsertionObject[] = [] + const chunkedObjects: O[][] = [] + let currentBatch: O[] = [] for (const obj of objects) { // if limits are exceeded start a new batch if (