You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/svelte/messages/client-errors/errors.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,10 @@
60
60
61
61
> The `%rune%` rune is only available inside `.svelte` and `.svelte.js/ts` files
62
62
63
+
## snippet_missing_mount
64
+
65
+
> Snippets created with `createRawSnippet(...)` and used on the client must specify a `mount` function
66
+
63
67
## state_frozen_invalid_argument
64
68
65
69
> The argument to `$state.frozen(...)` cannot be an object created with `$state(...)`. You should create a copy of it first, for example with `$state.snapshot`
Copy file name to clipboardExpand all lines: packages/svelte/src/internal/client/errors.js
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -278,6 +278,22 @@ export function state_frozen_invalid_argument() {
278
278
}
279
279
}
280
280
281
+
/**
282
+
* Snippets created with `createRawSnippet(...)` and used on the client must specify a `mount` function
283
+
* @returns {never}
284
+
*/
285
+
exportfunctionsnippet_missing_mount(){
286
+
if(DEV){
287
+
consterror=newError(`snippet_missing_mount\nSnippets created with \`createRawSnippet(...)\` and used on the client must specify a \`mount\` function`);
consterror=newError(`lifecycle_function_unavailable\n\`${name}(...)\` is not available on the server`);
10
10
11
+
error.name='Svelte error';
12
+
throwerror;
13
+
}
14
+
15
+
/**
16
+
* Snippets created with `createRawSnippet(...)` and used on the server must specify a `render` function
17
+
* @returns {never}
18
+
*/
19
+
exportfunctionsnippet_missing_render(){
20
+
consterror=newError(`snippet_missing_render\nSnippets created with \`createRawSnippet(...)\` and used on the server must specify a \`render\` function`);
0 commit comments