mirror of https://github.com/sveltejs/svelte
parent
695a309567
commit
a472ccf828
@ -0,0 +1,9 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
error: {
|
||||
code: 'invalid-props-rest-element',
|
||||
message: 'Cannot use ...rest parameter with $props.bindable()',
|
||||
position: [53, 62]
|
||||
}
|
||||
});
|
@ -0,0 +1,4 @@
|
||||
<script>
|
||||
let { foo, ...ok } = $props();
|
||||
let { bar, ...not_ok } = $props.bindable();
|
||||
</script>
|
@ -0,0 +1,9 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
error: {
|
||||
code: 'duplicate-prop-name',
|
||||
message: 'Cannot use the same prop name more than once across $props() and $props.bindable()',
|
||||
position: [44, 50]
|
||||
}
|
||||
});
|
@ -0,0 +1,4 @@
|
||||
<script>
|
||||
let { foo: a } = $props();
|
||||
let { foo: b } = $props.bindable();
|
||||
</script>
|
Loading…
Reference in new issue