diff --git a/src/cli/run.ts b/src/cli/run.ts index 3e59275..ea0c23b 100644 --- a/src/cli/run.ts +++ b/src/cli/run.ts @@ -259,7 +259,7 @@ function outputResults( report: CompareJsonEntry[], opts: Options, exitWithError: boolean, -): void { +): never { if (opts.json) { console.log(JSON.stringify(report, null, 2)); } diff --git a/src/commands/compare.ts b/src/commands/compare.ts index 91bc94e..38d9324 100644 --- a/src/commands/compare.ts +++ b/src/commands/compare.ts @@ -42,6 +42,13 @@ function createCategoryFilter( return (category: Category) => !onlySet || onlySet.has(category); } +interface ParsedAndFilteredEnv { + current: Record; + example: Record; + currentKeys: string[]; + exampleKeys: string[]; +} + /** * Parses and filters the environment and example files. * @param envPath The path to the .env file @@ -53,7 +60,7 @@ function parseAndFilter( envPath: string, examplePath: string, opts: ComparisonOptions, -) { +): ParsedAndFilteredEnv { const currentFull = parseEnvFile(envPath); const exampleFull = parseEnvFile(examplePath); @@ -121,7 +128,7 @@ function findDuplicates( */ export async function compareMany( pairs: FilePair[], - opts: ComparisonOptions, + opts: Readonly, ): Promise { let exitWithError = false;