diff --git a/.changeset/chatty-hotels-grin.md b/.changeset/chatty-hotels-grin.md index f72fd33beb..d31b9d35dc 100644 --- a/.changeset/chatty-hotels-grin.md +++ b/.changeset/chatty-hotels-grin.md @@ -2,4 +2,4 @@ 'svelte': patch --- -feat: adds $log rune +feat: add $log rune diff --git a/packages/svelte/src/main/ambient.d.ts b/packages/svelte/src/main/ambient.d.ts index 61cfadc8a1..6cfb48aec7 100644 --- a/packages/svelte/src/main/ambient.d.ts +++ b/packages/svelte/src/main/ambient.d.ts @@ -168,7 +168,7 @@ declare namespace $log { export function trace(): void; /** - * Deeply tracks and `console.table`s any values passed to the rune. Example: + * Logs the arguments with `console.table` whenever they change. Example: * * ```ts * $log.table(someDataCollection) diff --git a/sites/svelte-5-preview/src/routes/docs/content/01-api/02-runes.md b/sites/svelte-5-preview/src/routes/docs/content/01-api/02-runes.md index 84b71e7d6e..279273e79c 100644 --- a/sites/svelte-5-preview/src/routes/docs/content/01-api/02-runes.md +++ b/sites/svelte-5-preview/src/routes/docs/content/01-api/02-runes.md @@ -267,9 +267,9 @@ export default { ## `$log` -The `$log` rune is roughly equivalent to `console.log`, with the exception that when anything passed to the -rune changes, the latest values will be logged out. `$log` tracks reactive state deeply, meaning that mutating -something from with an object or array using fine-grain reactivity will be tracked. +The `$log` rune is roughly equivalent to `console.log`, with the exception that it will re-run whenever the +arguments change. `$log` tracks reactive state deeply, meaning that updating something inside an object +or array using [fine-grained reactivity](/docs/fine-grained-reactivity) will update the logs. ```svelte