Skip to content

Commit f1953d6

Browse files
Copilotna-trium-144
andcommitted
Make return types more explicit in jsEval worker
- Add explicit type assertion for empty updatedFiles object - Improves code clarity and consistency Co-authored-by: na-trium-144 <100704180+na-trium-144@users.noreply.github.com>
1 parent 973132d commit f1953d6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/terminal/worker/jsEval.worker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ async function runCode(code: string): Promise<{
102102
const output = [...jsOutput];
103103
jsOutput = []; // Clear output
104104

105-
return { output, updatedFiles: {} };
105+
return { output, updatedFiles: {} as Record<string, string> };
106106
}
107107

108108
function runFile(
@@ -131,7 +131,7 @@ function runFile(
131131
const output = [...jsOutput];
132132
jsOutput = []; // Clear output
133133

134-
return { output, updatedFiles: {} };
134+
return { output, updatedFiles: {} as Record<string, string> };
135135
}
136136

137137
async function checkSyntax(

0 commit comments

Comments
 (0)