Skip to content

Commit c91b18d

Browse files
fix: avoid nested template literals in worker code string
1 parent 1123fda commit c91b18d

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

packages/dtsx/src/worker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export class WorkerPool {
238238
239239
if (writeOutput) {
240240
if (!outPath) {
241-
throw new Error(`Missing outPath for ${filePath}`);
241+
throw new Error('Missing outPath for ' + filePath);
242242
}
243243
if (bun) {
244244
writePromises[i] = bun.write(outPath, content);
@@ -280,7 +280,7 @@ export class WorkerPool {
280280
}
281281
282282
const errorMessage = errorResults?.length
283-
? (`${errorResults[0].filePath}: ${errorResults[0].error || 'Worker batch failed'}`)
283+
? errorResults[0].filePath + ': ' + (errorResults[0].error || 'Worker batch failed')
284284
: undefined;
285285
286286
return {
@@ -322,7 +322,7 @@ export class WorkerPool {
322322
};
323323
}
324324
325-
throw new Error(`Unknown task type: ${task.type}`);
325+
throw new Error('Unknown task type: ' + task.type);
326326
} catch (error) {
327327
return {
328328
id: task.id,

0 commit comments

Comments
 (0)