diff --git a/plugins/search-backend-node/src/IndexBuilder.ts b/plugins/search-backend-node/src/IndexBuilder.ts index 6be4489127..69c1b2e6fc 100644 --- a/plugins/search-backend-node/src/IndexBuilder.ts +++ b/plugins/search-backend-node/src/IndexBuilder.ts @@ -134,18 +134,21 @@ export class IndexBuilder { // Compose collator/decorators/indexer into a pipeline return new Promise(done => { - pipeline([collator, ...decorators, indexer], error => { - if (error) { - this.logger.error( - `Collating documents for ${type} failed: ${error}`, - ); - } else { - this.logger.info(`Collating documents for ${type} succeeded`); - } + pipeline( + [collator, ...decorators, indexer], + (error: NodeJS.ErrnoException | null) => { + if (error) { + this.logger.error( + `Collating documents for ${type} failed: ${error}`, + ); + } else { + this.logger.info(`Collating documents for ${type} succeeded`); + } - // Signal index pipeline completion! - done(); - }); + // Signal index pipeline completion! + done(); + }, + ); }); }, this.collators[type].refreshInterval * 1000); }); diff --git a/plugins/search-backend-node/src/test-utils/TestPipeline.ts b/plugins/search-backend-node/src/test-utils/TestPipeline.ts index 162572d929..dd90de4f38 100644 --- a/plugins/search-backend-node/src/test-utils/TestPipeline.ts +++ b/plugins/search-backend-node/src/test-utils/TestPipeline.ts @@ -129,7 +129,7 @@ export class TestPipeline { } pipes.push(this.indexer!); - pipeline(pipes, error => { + pipeline(pipes, (error: NodeJS.ErrnoException | null) => { done({ error, documents,