@samitouri / QOS-React-2 / commits / ec3d36b865

Convert unhandled value block terminal to todo

While i'm here, we know that there are a variety of cases that are not supported yet around combining value blocks with other syntax constructs. Since we're aware of these cases and detect them, we can make this a todo instead of an invariant.

Joe Savona committed Mar 13, 2024 at 22:25 UTC ec3d36b865afa296e92e392618cf06bf2d717092
1 file changed +2 -2
compiler/packages/babel-plugin-react-forget/src/ReactiveScopes/BuildReactiveFunction.ts
+2 -2
@@ -1078,8 +1078,8 @@ class Driver {
1078 });
1079 }
1080 default: {
1081 - CompilerError.invariant(false, {
1082 - reason: `Unexpected value block terminal kind '${terminal.kind}'`,
1081 + CompilerError.throwTodo({
1082 + reason: `Support '${terminal.kind}' as a value block terminal (conditional, logical, optional chaining, etc)`,
1083 description: null,
1084 loc: terminal.loc,
1085 suggestions: null,