Update scope declaration invariant to support error grouping

This invariant interpolated values into the `reason` which prevent our internal 
tooling from grouping related errors. This PR updates to make the reason static 
and interpolate the description.
This commit is contained in:
Joe Savona
2024-02-26 15:08:42 -08:00
parent d81da8e2f5
commit 84ed1f2a37
@@ -435,8 +435,8 @@ function codegenReactiveScope(
);
if (testCondition === null) {
CompilerError.invariant(firstOutputIndex !== null, {
reason: `Expected scope '@${scope.id}' to have at least one declaration`,
description: null,
reason: `Expected scope to have at least one declaration`,
description: `Scope '@{scope.id} has no declarations`,
loc: null,
suggestions: null,
});