(sub: Subscriber)
| 310 | } |
| 311 | |
| 312 | function prepareDeps(sub: Subscriber) { |
| 313 | // Prepare deps for tracking, starting from the head |
| 314 | for (let link = sub.deps; link; link = link.nextDep) { |
| 315 | // set all previous deps' (if any) version to -1 so that we can track |
| 316 | // which ones are unused after the run |
| 317 | link.version = -1 |
| 318 | // store previous active sub if link was being used in another context |
| 319 | link.prevActiveLink = link.dep.activeLink |
| 320 | link.dep.activeLink = link |
| 321 | } |
| 322 | } |
| 323 | |
| 324 | function cleanupDeps(sub: Subscriber) { |
| 325 | // Cleanup unused deps |
no outgoing calls
no test coverage detected