Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 82ea50b

Browse files
committedApr 14, 2025·
allow unknown operators
1 parent 7d697d9 commit 82ea50b

File tree

1 file changed

+2
-6
lines changed
  • packages/svelte/src/compiler/phases

1 file changed

+2
-6
lines changed
 

Diff for: ‎packages/svelte/src/compiler/phases/scope.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,7 @@ class Evaluation {
238238
break;
239239

240240
default:
241-
// @ts-expect-error we can't guard against future operators without
242-
// TypeScript getting confused
243-
throw new Error(`Unknown operator ${expression.operator}`);
241+
this.values.add(UNKNOWN);
244242
}
245243
break;
246244

@@ -328,9 +326,7 @@ class Evaluation {
328326
break;
329327

330328
default:
331-
// @ts-expect-error we can't guard against future operators without
332-
// TypeScript getting confused
333-
throw new Error(`Unknown operator ${expression.operator}`);
329+
this.values.add(UNKNOWN);
334330
}
335331
break;
336332

0 commit comments

Comments
 (0)
Please sign in to comment.