Skip to content

Ref binds fail to understand element specific type #400

@dkzlv

Description

@dkzlv

Describe the bug
Currently, any ref binding assigns HTMLElement type instead of a specific element type.
I think it broke recently, because it used to work fine.

To Reproduce

<script lang="ts">
  let ref: HTMLInputElement | undefined;
</script>

<!-- Type 'HTMLElement' is missing the following properties from type 'HTMLInputElement': accept, align, alt, autocomplete, and 49 more -->
<input bind:this={ref} />

Expected behavior
Should understand the type without help.

System (please complete the following information):

  • OS: Mac OS X latest
  • IDE: VSCode latest
  • Plugin/Package: Svelte for VS Code 101.7.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedFixed in master branch. Pending production release.bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions