Skip to content

Svelte 5: The $bindable rune is only available inside .svelte and .svelte.js/ts files  #11173

@rob-balfre

Description

@rob-balfre

Describe the bug

If you accidentally omit the function parentheses on $bindable you get the wrong error message. Led to a few minutes of confusion!

Reproduction

https://svelte-5-preview.vercel.app/#H4sIAAAAAAAAE0WMwQoCIRRFf0UeLQoG2psz0KafyBbj-IYERx_6DEL897AJWp7DPbfC6jxmkPcKYd4QJFyJYAB-U4f8Qs8IA-RY0tKNyktyxJMOmj2yqMIU5hjEKA7GBTsbj6J1ohQpH08XHdT5HwX12_ex5KfLY91N-37eYuzBriYYYIvWrQ4tSE4F26N9APYKwD-0AAAA

Logs

No response

System Info

System:
    OS: macOS 14.4.1
    CPU: (8) arm64 Apple M1
    Memory: 93.30 MB / 8.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
    pnpm: 8.15.7 - ~/pnpm/pnpm
    bun: 1.0.0 - ~/.bun/bin/bun
  Browsers:
    Chrome: 123.0.6312.122
    Firefox Nightly: 124.0a1
    Safari: 17.4.1
    Safari Technology Preview: 17.4
  npmPackages:
    svelte: ^5.0.0-next.103 => 5.0.0-next.103

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions