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/src/internal/shared/errors.js
+16-16Lines changed: 16 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,22 @@
2
2
3
3
import{DEV}from'esm-env';
4
4
5
+
/**
6
+
* Cannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead
7
+
* @returns {never}
8
+
*/
9
+
exportfunctioninvalid_default_snippet(){
10
+
if(DEV){
11
+
consterror=newError(`invalid_default_snippet\nCannot use \`{@render children(...)}\` if the parent component uses \`let:\` directives. Consider using a named snippet instead`);
12
+
13
+
error.name='Svelte error';
14
+
throwerror;
15
+
}else{
16
+
// TODO print a link to the documentation
17
+
thrownewError("invalid_default_snippet");
18
+
}
19
+
}
20
+
5
21
/**
6
22
* `%name%(...)` can only be used during component initialisation
7
23
* @param {string} name
@@ -82,20 +98,4 @@ export function svelte_element_invalid_this_value() {
* Cannot use `{@render children(...)}` if the parent component uses `let:` directives. Consider using a named snippet instead
89
-
* @returns {never}
90
-
*/
91
-
exportfunctioninvalid_default_snippet(){
92
-
if(DEV){
93
-
consterror=newError(`invalid_default_snippet\nCannot use \`{@render children(...)}\` if the parent component uses \`let:\` directives. Consider using a named snippet instead`);
0 commit comments