fix(build): resolve TypeScript compilation errors in optimization modules
## Changes - Export SearchStrategy enum for external module access - Fix executeInThread function call signature with proper arguments - Add missing useDiskBasedIndex property to OptimizedHNSWConfig defaults - Resolve property override issues in ScaledHNSWSystem constructor - Add explicit type annotations for S3 object parameters - Fix ArrayBuffer type casting for compression operations ## Impact All optimization modules now compile cleanly without TypeScript errors, ensuring type safety and proper module integration.
This commit is contained in:
parent
e2e1e00a10
commit
4c8b4c3248
5 changed files with 27 additions and 17 deletions
|
|
@ -196,7 +196,7 @@ export class BatchS3Operations {
|
|||
|
||||
if (listResponse.Contents) {
|
||||
// Filter objects that match our requested IDs
|
||||
const matchingObjects = listResponse.Contents.filter(obj => {
|
||||
const matchingObjects = listResponse.Contents.filter((obj: any) => {
|
||||
if (!obj.Key) return false
|
||||
const id = obj.Key.replace(prefix, '').replace('.json', '')
|
||||
return idSet.has(id)
|
||||
|
|
@ -205,7 +205,7 @@ export class BatchS3Operations {
|
|||
// Batch retrieve matching objects
|
||||
const semaphore = new Semaphore(this.options.maxConcurrency!)
|
||||
|
||||
const retrievalPromises = matchingObjects.map(async (obj) => {
|
||||
const retrievalPromises = matchingObjects.map(async (obj: any) => {
|
||||
if (!obj.Key) return
|
||||
|
||||
await semaphore.acquire()
|
||||
|
|
|
|||
|
|
@ -103,11 +103,13 @@ export class ReadOnlyOptimizations {
|
|||
break
|
||||
|
||||
case CompressionType.GZIP:
|
||||
compressedData = await this.gzipCompress(new Float32Array(vector).buffer)
|
||||
const gzipBuffer = new Float32Array(vector).buffer
|
||||
compressedData = await this.gzipCompress(gzipBuffer.slice(0))
|
||||
break
|
||||
|
||||
case CompressionType.BROTLI:
|
||||
compressedData = await this.brotliCompress(new Float32Array(vector).buffer)
|
||||
const brotliBuffer = new Float32Array(vector).buffer
|
||||
compressedData = await this.brotliCompress(brotliBuffer.slice(0))
|
||||
break
|
||||
|
||||
case CompressionType.HYBRID:
|
||||
|
|
@ -117,7 +119,8 @@ export class ReadOnlyOptimizations {
|
|||
break
|
||||
|
||||
default:
|
||||
compressedData = new Float32Array(vector).buffer
|
||||
const defaultBuffer = new Float32Array(vector).buffer
|
||||
compressedData = defaultBuffer.slice(0)
|
||||
break
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue