Repository navigation
Commit 1d78a83
committed
fix(compiler): unwrap TS wrappers on method-call receiver and computed key in dep collection
staticDepMemberName and the CallExpression handler in collectDepPaths did not
peel TSAsExpression, TSNonNullExpression, TSSatisfiesExpression, TSTypeAssertion,
or ParenthesizedExpression from the receiver object or computed property key.
Spellings such as props!.load(id), (props as T).load(id), or
props['load' as const](id) fell through to the fallback walk and recorded the
whole receiver as a free identifier instead of emitting the guarded __methodDep
probe.
Apply unwrapTsExpr to callee.object in the CallExpression handler and to
member.property in staticDepMemberName, matching the unwrapValue already used by
staticMemberInfo in hook-deps.js.1 parent 0f03a0d commit 1d78a83
1 file changed
Lines changed: 7 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18077 | 18077 | | |
18078 | 18078 | | |
18079 | 18079 | | |
18080 | | - | |
18081 | | - | |
18082 | | - | |
18083 | | - | |
18084 | | - | |
18085 | | - | |
| 18080 | + | |
| 18081 | + | |
| 18082 | + | |
18086 | 18083 | | |
18087 | 18084 | | |
18088 | 18085 | | |
| |||
18342 | 18339 | | |
18343 | 18340 | | |
18344 | 18341 | | |
18345 | | - | |
18346 | | - | |
| 18342 | + | |
| 18343 | + | |
| 18344 | + | |
18347 | 18345 | | |
18348 | | - | |
| 18346 | + | |
18349 | 18347 | | |
18350 | 18348 | | |
18351 | 18349 | | |
| |||
0 commit comments