mirror of https://github.com/sveltejs/svelte
parent
33e44ea697
commit
c42bb04276
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: disallow accessing internal Svelte props
|
@ -0,0 +1,9 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
error: {
|
||||
code: 'props_illegal_name',
|
||||
message:
|
||||
'Declaring or accessing a prop starting with `$$` is illegal (they are reserved for Svelte internals)'
|
||||
}
|
||||
});
|
@ -0,0 +1,3 @@
|
||||
<script>
|
||||
let { $$slots: a } = $props();
|
||||
</script>
|
@ -0,0 +1,9 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
error: {
|
||||
code: 'props_illegal_name',
|
||||
message:
|
||||
'Declaring or accessing a prop starting with `$$` is illegal (they are reserved for Svelte internals)'
|
||||
}
|
||||
});
|
@ -0,0 +1,4 @@
|
||||
<script>
|
||||
let props = $props();
|
||||
props.$$slots;
|
||||
</script>
|
Loading…
Reference in new issue