mirror of
https://github.com/TanStack/router.git
synced 2026-11-16 19:38:07 +00:00
fix(router-utils): a name read or written through an expression handing its value on is one of its object
memberUse climbs through every expression that evaluates to its operand's
value (a conditional's branch, `??`/`||`/`&&`, a sequence's last, `await`,
an assignment's value) and through array and object literals a member read
reads back, before asking what reads or writes the value. One rule instead
of a list of parent shapes: `(alias ?? {}).b`, `[alias][0].b` and
`(on ? alias : {}).b = 2` read or write what `alias` holds, ordered against
writes of the original (Fable's review of order rule v2, finding 1:
cases/wrap.json 125/125 and cases/lmatrix.json 880/880 agree, head's 3
included). A mutating method's receiver is a member of the value, not a
literal holding it (`[x].push(1)` writes no `x`).
The report-reading check of placement.test.ts follows names a destructuring
binds, so it can check the destructured-alias row.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c23de7375d
commit
f57abeadfa
4 changed files with 102 additions and 39 deletions
Loading…
Add table
Add a link
Reference in a new issue