svelte
svelte copied to clipboard
[runes] Add the ability to get a list of dependencies
Describe the problem
With automatic dependency tracking, it sometimes becomes difficult to understand what is really going on. Especially if there are classes, functions that call other functions, libraries, conditional dependencies, etc.
It would be nice to be able to get a list of current dependencies with details.
Describe the proposed solution
- contains the value of the dependency
- contains the path from root variable to dependency (
obj.a.b.c,arr[0].a) - contains the value of the root variable (
obj,arr) - contains the call stack (or stacks) for the place in the code where this dependency is added (referenced)
- contains the type of dependency (
$state,$derived, ...) - for
$derived,$effect, markup - through a rune or a utility? add to
$inspect? - it is possible only through development tools and plugins?
- it is possible only in development mode?
Importance
nice to have