Skip to content

Commit 9b9f327

Browse files
committed
style(resolveConfig): add tsdoc to some values and interfaces
1 parent ba0349c commit 9b9f327

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/mongodb-memory-server-core/src/util/resolveConfig.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { isNullOrUndefined } from './utils';
77

88
const log = debug('MongoMS:ResolveConfig');
99

10+
/** Enum of all possible config options */
1011
export enum ResolveConfigVariables {
1112
DOWNLOAD_DIR = 'DOWNLOAD_DIR',
1213
PLATFORM = 'PLATFORM',
@@ -26,9 +27,11 @@ export enum ResolveConfigVariables {
2627
USE_ARCHIVE_NAME_FOR_BINARY_NAME = 'USE_ARCHIVE_NAME_FOR_BINARY_NAME',
2728
}
2829

30+
/** The Prefix for Environmental values */
2931
export const ENV_CONFIG_PREFIX = 'MONGOMS_';
3032
/** This Value exists here, because "defaultValues" can be changed with "setDefaultValue", but this property is constant */
3133
export const DEFAULT_VERSION = '5.0.8';
34+
/** Default values for some config options that require explicit setting, it is constant so that the default values cannot be interfered with */
3235
export const defaultValues = new Map<ResolveConfigVariables, string>([
3336
// apply app-default values here
3437
[ResolveConfigVariables.VERSION, DEFAULT_VERSION],
@@ -39,6 +42,7 @@ export const defaultValues = new Map<ResolveConfigVariables, string>([
3942
[ResolveConfigVariables.USE_ARCHIVE_NAME_FOR_BINARY_NAME, 'false'],
4043
]);
4144

45+
/** Interface for storing information about the found package.json from `findPackageJson` */
4246
interface PackageJSON {
4347
/** The Path where the package.json was found (directory, not the file) */
4448
filePath: string;
@@ -57,6 +61,7 @@ export function setDefaultValue(key: ResolveConfigVariables, value: string): voi
5761
}
5862

5963
// let packageJsonConfig: Record<string, string> = {};
64+
/** Cache the found package.json file */
6065
let packagejson: PackageJSON | undefined = undefined;
6166
/**
6267
* Find the nearest package.json (that has an non-empty config field) for the provided directory

0 commit comments

Comments
 (0)