From 82ea50b560026a390968acdbe4b097b74e05f89a Mon Sep 17 00:00:00 2001 From: Rich Harris Date: Mon, 14 Apr 2025 14:01:59 -0400 Subject: [PATCH] allow unknown operators --- packages/svelte/src/compiler/phases/scope.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/svelte/src/compiler/phases/scope.js b/packages/svelte/src/compiler/phases/scope.js index fce6aee880..c0976caef3 100644 --- a/packages/svelte/src/compiler/phases/scope.js +++ b/packages/svelte/src/compiler/phases/scope.js @@ -238,9 +238,7 @@ class Evaluation { break; default: - // @ts-expect-error we can't guard against future operators without - // TypeScript getting confused - throw new Error(`Unknown operator ${expression.operator}`); + this.values.add(UNKNOWN); } break; @@ -328,9 +326,7 @@ class Evaluation { break; default: - // @ts-expect-error we can't guard against future operators without - // TypeScript getting confused - throw new Error(`Unknown operator ${expression.operator}`); + this.values.add(UNKNOWN); } break;