Skip to content

Detect incorrect ref usage in template #1840

Closed
@stefnotch

Description

@stefnotch

What problem does this feature solve?

Since #1682 , refs in templates are not deeply unwrapped anymore. However, always remembering that isn't easy.

I frequently type something like

{{element.scope.name}}

when I actually mean

{{element.scope.value?.name}}

Sadly, neither my IDE (Visual Studio Code with Vetur) nor Vue.js catch this issue. At runtime, you simply see nothing. It would be great if that were improved.

What does the proposed API look like?

Maybe the template compiler has enough information to catch such incorrect usage. Otherwise, I guess this is an issue for Vetur?

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