dillon1000/react
Commit
Browse files Support unused conditional/logical expressions assigned to variable
I noticed some instances of this error when running forget on an internal product. I previously fixed the case if a logical/conditional used only for side effects (not assigned to a variable) but the new cases were assigned to an unused variable. I double-checked and we’ve actually fixed all the steps after these invariants so we can just remove them and support these cases.
Changed paths7 files
First-parent comparisoncompiler/forget/src/ReactiveScopes/BuildReactiveFunction.ts ModifiedA compiler/forget/src/__tests__/fixtures/compiler/unused-logical-assigned-to-variable.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/unused-logical-assigned-to-variable.js AddedA compiler/forget/src/__tests__/fixtures/compiler/unused-optional-method-assigned-to-variable.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/unused-optional-method-assigned-to-variable.js AddedA compiler/forget/src/__tests__/fixtures/compiler/unused-ternary-assigned-to-variable.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/unused-ternary-assigned-to-variable.js AddedPatch
Files changed
Rendering syntax-highlighted changes…