I believe callbacks for the *Observer category of web APIs should be treated like those for setTimeout and friends and not marked as untracked.
To Reproduce
const [signal] = createSignal(5);
new IntersectionObserver(() => console.log(signal()));
new MutationObserver(() => console.log(signal()));
new PerformanceObserver(() => console.log(signal()));
new ReportingObserver(() => console.log(signal()));
new ResizeObserver(() => console.log(signal()));
Expected behavior
Using signals in these kinds of callbacks should not generate a warning.
Screenshots
[x] I would be willing to contribute a PR to fix this issue
Describe the bug
I believe callbacks for the
*Observer
category of web APIs should be treated like those forsetTimeout
and friends and not marked as untracked.To Reproduce
Expected behavior
Using signals in these kinds of callbacks should not generate a warning.
Screenshots![Rule "solid/reactivity" gives a warning that reads "This function should be passed to a tracked scope (like createEffect) or an event handler because it contains reactivity." for the code provided above](https://user-images.githubusercontent.com/48020855/222915197-95153e63-d6a6-4c09-86ca-e8b2264dcbbd.png)