refactor: cleanup ElementsPerWorkerType type definition
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 29 Nov 2023 20:28:06 +0000 (21:28 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 29 Nov 2023 20:28:06 +0000 (21:28 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/types/ConfigurationData.ts
src/types/index.ts
src/utils/ConfigurationUtils.ts

index df362b5390c9b0827ea5a11713de88228212ab55..d1948921660b0da42774c813686405c2baf4d74c 100644 (file)
@@ -64,12 +64,12 @@ export interface StorageConfiguration {
   uri?: string;
 }
 
-export type elementsPerWorkerType = number | 'auto' | 'all';
+export type ElementsPerWorkerType = number | 'auto' | 'all';
 
 export interface WorkerConfiguration {
   processType?: WorkerProcessType;
   startDelay?: number;
-  elementsPerWorker?: elementsPerWorkerType;
+  elementsPerWorker?: ElementsPerWorkerType;
   elementStartDelay?: number;
   poolMinSize?: number;
   poolMaxSize?: number;
index a28d51148dc596aa05454b5f6632b218e56feb64..a707b46b01738145aeffbfd4107e6885cfc62fa6 100644 (file)
@@ -167,6 +167,7 @@ export {
   ApplicationProtocolVersion,
   type ConfigurationData,
   ConfigurationSection,
+  type ElementsPerWorkerType,
   type LogConfiguration,
   type StationTemplateUrl,
   type StorageConfiguration,
index 660bc7649f2fcc4f7106263a696fa69aea3a279a..73bd9ceb8dbf4124ad34ed8962c94493f75be671 100644 (file)
@@ -5,8 +5,7 @@ import chalk from 'chalk';
 
 import { Constants } from './Constants';
 import { isNotEmptyString, logPrefix as utilsLogPrefix } from './Utils';
-import { FileType, StorageType } from '../types';
-import type { elementsPerWorkerType } from '../types/ConfigurationData';
+import { type ElementsPerWorkerType, FileType, StorageType } from '../types';
 import { WorkerProcessType } from '../worker';
 
 export const logPrefix = (): string => {
@@ -69,7 +68,7 @@ export const checkWorkerProcessType = (workerProcessType: WorkerProcessType): vo
 };
 
 export const checkWorkerElementsPerWorker = (
-  elementsPerWorker: elementsPerWorkerType | undefined,
+  elementsPerWorker: ElementsPerWorkerType | undefined,
 ): void => {
   if (
     elementsPerWorker !== undefined &&