Skip to content

bind:value={fn, fn} expects incorrect types #15623

Open
@gyzerok

Description

@gyzerok

Describe the bug

It seems like Svelte is using type inference for binds which ends up with incorrect typings.

In practice for <input type="number" /> the values are of type number | null, but it shows string in the following example.

Image

This ends up with runtime errors down the road.

Reproduction

REPL

Logs

System Info

Svelte 5.25.3, TypeScript 5.8.2

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions