Skip to content

Commit 4125fed

Browse files
Fix TypeScript compilation error in src/diff.ts due to updated translateOptions signature
Co-authored-by: sunnylqm <615282+sunnylqm@users.noreply.github.com>
1 parent 190043d commit 4125fed

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/diff.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ function diffArgsCheck(
356356
const { output } = translateOptions({
357357
...options,
358358
tempDir,
359-
});
359+
} as DiffCommandOptions & { tempDir: string });
360360
if (typeof output !== 'string') {
361361
throw new Error('Output path is required.');
362362
}

src/utils/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ export async function question(query: string, password?: boolean) {
104104
export function translateOptions<T extends Record<string, unknown>>(
105105
options: T,
106106
map?: Record<string, string>,
107-
): T {
107+
): T & Record<string, unknown> {
108108
if (!map) {
109109
// Existing logic for template replacement if no map is provided
110110
const ret: Record<string, unknown> = {};

0 commit comments

Comments
 (0)