docs: clarify `$inspect.trace` docs (#15858)

* docs: clarify `$inspect.trace` docs

* Update 07-$inspect.md

* Update documentation/docs/02-runes/07-$inspect.md

---------

Co-authored-by: Rich Harris <rich.harris@vercel.com>
pull/15863/head
Ben McCann 4 months ago committed by GitHub
parent c051a6eb1e
commit 0ace76d8f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -52,6 +52,7 @@ This rune, added in 5.14, causes the surrounding function to be _traced_ in deve
import { doSomeWork } from './elsewhere';
$effect(() => {
+++// $inspect.trace must be the first statement of a function body+++
+++$inspect.trace();+++
doSomeWork();
});

Loading…
Cancel
Save