dillon1000/react

Commit

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.
Browse files
Changed paths7 files
First-parent comparison
M compiler/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 Added
Patch

Files changed

Rendering syntax-highlighted changes…