Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/weak-flowers-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'svelte': patch
---

patch structuredClone in dev to error on $state proxies
6 changes: 6 additions & 0 deletions documentation/docs/98-reference/.generated/shared-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ Certain lifecycle methods can only be used during component initialisation. To f
`%name%` is not a store with a `subscribe` method
```

### structured_clone_state_proxy

```
To correctly clone a `$state` proxy, use `$state.snapshot` instead of `structuredClone`
```

### svelte_element_invalid_this_value

```
Expand Down
4 changes: 4 additions & 0 deletions packages/svelte/messages/shared-errors/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ Certain lifecycle methods can only be used during component initialisation. To f

> `%name%` is not a store with a `subscribe` method

## structured_clone_state_proxy

> To correctly clone a `$state` proxy, use `$state.snapshot` instead of `structuredClone`

## svelte_element_invalid_this_value

> The `this` prop on `<svelte:element>` must be a string, if defined
Loading
Loading