From 4eb5eacfb26ff9155036e9735113de328cf03aa3 Mon Sep 17 00:00:00 2001 From: Rob Leidle Date: Wed, 7 Aug 2024 07:02:31 -0700 Subject: [PATCH] Fix a build breakage on MacOS (#1955) Without this change, the following error occurs on MacOS (but not linux): ../core/indexing/chunk/ChunkCodebaseIndex.ts:175:5 - error TS2322: Type 'unknown[]' is not assignable to type 'Chunk[]'. Type '{}' is missing the following properties from type 'Chunk': digest, filepath, index, content, and 2 more. 175 return chunkLists.flat(); ~~~~~~~~~~~~~~~~~~~~~~~~~ Co-authored-by: Rob Leidle --- core/indexing/chunk/ChunkCodebaseIndex.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/indexing/chunk/ChunkCodebaseIndex.ts b/core/indexing/chunk/ChunkCodebaseIndex.ts index aff9d7c52..aaca80e0e 100644 --- a/core/indexing/chunk/ChunkCodebaseIndex.ts +++ b/core/indexing/chunk/ChunkCodebaseIndex.ts @@ -170,7 +170,7 @@ export class ChunkCodebaseIndex implements CodebaseIndex { } private async computeChunks(paths: PathAndCacheKey[]): Promise { - const chunkLists = await Promise.all(paths.map(this.packToChunks.bind(this))); + const chunkLists = await Promise.all(paths.map(p => this.packToChunks(p))); return chunkLists.flat(); }