(fn)
| 261 | * @returns {() => void} |
| 262 | */ |
| 263 | export function effect_root(fn) { |
| 264 | Batch.ensure(); |
| 265 | const effect = create_effect(ROOT_EFFECT | EFFECT_PRESERVED, fn); |
| 266 | |
| 267 | return () => { |
| 268 | destroy_effect(effect); |
| 269 | }; |
| 270 | } |
| 271 | |
| 272 | /** |
| 273 | * An effect root whose children can transition out |
no test coverage detected
searching dependent graphs…