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 <rleidle@tesla.com>
This commit is contained in:
Rob Leidle 2024-08-07 07:02:31 -07:00 • committed by GitHub
parent 8b347aaa76
commit 4eb5eacfb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -170,7 +170,7 @@ export class ChunkCodebaseIndex implements CodebaseIndex {
}
private async computeChunks(paths: PathAndCacheKey[]): Promise<Chunk[]> {
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();
}