Просмотр исходного кода

Fix type name from ElasticSEarchClientDeletegator to ElasticsearchClientDelegator for consistency across files

Shun Miyazawa 9 месяцев назад
Родитель
Сommit
2315446554

+ 4 - 4
apps/app/src/server/service/search-delegator/elasticsearch-client-delegator/get-client.ts

@@ -5,7 +5,7 @@ import type { ClientOptions as ES9ClientOptions } from '@elastic/elasticsearch9'
 import { type ES7ClientDelegator } from './es7-client-delegator';
 import { type ES8ClientDelegator } from './es8-client-delegator';
 import { type ES9ClientDelegator } from './es9-client-delegator';
-import type { ElasticSEarchClientDeletegator } from './interfaces';
+import type { ElasticsearchClientDelegator } from './interfaces';
 
 type GetDelegatorOptions = {
   version: 7;
@@ -24,16 +24,16 @@ type GetDelegatorOptions = {
 type IsAny<T> = 'dummy' extends (T & 'dummy') ? true : false;
 type Delegator<Opts extends GetDelegatorOptions> =
   IsAny<Opts> extends true
-    ? ElasticSEarchClientDeletegator
+    ? ElasticsearchClientDelegator
     : Opts extends { version: 7 }
       ? ES7ClientDelegator
       : Opts extends { version: 8 }
         ? ES8ClientDelegator
         : Opts extends { version: 9 }
           ? ES9ClientDelegator
-          : ElasticSEarchClientDeletegator
+          : ElasticsearchClientDelegator
 
-let instance: ElasticSEarchClientDeletegator | null = null;
+let instance: ElasticsearchClientDelegator | null = null;
 export const getClient = async<Opts extends GetDelegatorOptions>(opts: Opts): Promise<Delegator<Opts>> => {
   if (instance == null) {
     if (opts.version === 7) {

+ 1 - 1
apps/app/src/server/service/search-delegator/elasticsearch-client-delegator/interfaces.ts

@@ -2,4 +2,4 @@ import type { ES7ClientDelegator } from './es7-client-delegator';
 import type { ES8ClientDelegator } from './es8-client-delegator';
 import type { ES9ClientDelegator } from './es9-client-delegator';
 
-export type ElasticSEarchClientDeletegator = ES7ClientDelegator | ES8ClientDelegator | ES9ClientDelegator;
+export type ElasticsearchClientDelegator = ES7ClientDelegator | ES8ClientDelegator | ES9ClientDelegator;

+ 2 - 2
apps/app/src/server/service/search-delegator/elasticsearch.ts

@@ -24,7 +24,7 @@ import type { UpdateOrInsertPagesOpts } from '../interfaces/search';
 
 import { aggregatePipelineToIndex } from './aggregate-to-index';
 import type { AggregatedPage, BulkWriteBody, BulkWriteCommand } from './bulk-write';
-import { getClient, type ElasticSEarchClientDeletegator } from './elasticsearch-client-delegator';
+import { getClient, type ElasticsearchClientDelegator } from './elasticsearch-client-delegator';
 
 const logger = loggerFactory('growi:service:search-delegator:elasticsearch');
 
@@ -61,7 +61,7 @@ class ElasticsearchDelegator implements SearchDelegator<Data, ESTermsKey, ESQuer
 
   private elasticsearchVersion: 7 | 8 | 9;
 
-  private client: ElasticSEarchClientDeletegator;
+  private client: ElasticsearchClientDelegator;
 
   private indexName: string;