Skip to content

Commit fac363d

Browse files
committed
fix(resolveConfig): simplify packageJson type
1 parent bfccde3 commit fac363d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ export function setDefaultValue(key: ResolveConfigVariables, value: string): voi
3434
defaultValues.set(key, value);
3535
}
3636

37-
let packageJsonConfig: {
38-
[key: string]: string;
39-
} = {};
37+
let packageJsonConfig: Record<string, string> = {};
4038
/**
4139
* Find the nearest package.json for the provided directory
4240
* @param directory Set an custom directory to search the config in (default: process.cwd())
4341
*/
44-
export function findPackageJson(directory?: string): void {
42+
export function findPackageJson(directory?: string): Record<string, string> {
4543
const finderIterator = finder(directory || process.cwd()).next();
4644
log(`Using package.json at "${finderIterator.filename}"`);
4745
packageJsonConfig = finderIterator.value?.config?.mongodbMemoryServer ?? {};
46+
47+
return packageJsonConfig;
4848
}
4949
findPackageJson();
5050

0 commit comments

Comments
 (0)