dillon1000/react
Commit
Browse files Improve conditional dependency tracking for optional member expr inside optional call
When we traverse an OptionalExpression in PropagateScopeDependencies, we previously considered the entire value to be optional. With the changes in this stack to more accurately model OptionalMemberExpression, the `object` portion of an OptionalMemberExpression is now evaluated within the OptionalExpression. This PR refines the handling of OptionalExpression accordingly, so that we only treat the optional portion as conditional.
Changed paths5 files
First-parent comparisoncompiler/forget/src/ReactiveScopes/PropagateScopeDependencies.ts ModifiedA compiler/forget/src/__tests__/fixtures/compiler/reactive-dependencies-non-optional-properties-inside-optional-chain.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/reactive-dependencies-non-optional-properties-inside-optional-chain.js AddedA compiler/forget/src/__tests__/fixtures/compiler/reduce-reactive-dependencies-optional-member-expression.expect.md AddedA compiler/forget/src/__tests__/fixtures/compiler/reduce-reactive-dependencies-optional-member-expression.js AddedPatch
Files changed
Rendering syntax-highlighted changes…