-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Closed
Description
Describe the bug
If you have a component like this you cannot bind the prop open
<script lang="ts">
let {open: is_open = $bindable(false)}: Props = $props();
export const open = ()=>{
console.log("open export called");
}
</script>
<div>AAA</div>We should be able to bind to the open prop even if we cannot bind to the open export
Reproduction
Remove the comment to see the error
Logs
bind_invalid_export Component Child.svelte has an export named `open` that a consumer component is trying to access using `bind:open`, which is disallowed. Instead, use `bind:this` (e.g. `<Child bind:this={component} />`) and then access the property on the bound component instance (e.g. `component.open`) https://svelte.dev/e/bind_invalid_exportSystem Info
Does not matterSeverity
annoyance
Metadata
Metadata
Assignees
Labels
No labels