Skip to content

add example of $ref casting to any in documentation #94

Closed
@jraller

Description

@jraller

If using ref on an element in a template and expecting to reference it with this.$ref one needs to change it to the proper element type or to any in order to access properties of the referred element (this.$refs.checkboxElement as HTMLFormElement).checked. The error error TS2339: Property 'checked' does not exist on type 'Vue | Element | Vue[] | Element[]' will be encountered otherwise.

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