Skip to content

Error when property value is an instance of a class using private class fields #8149

Description

@LeaVerou

Vue version

3.2.47

Link to minimal reproduction

https://codepen.io/leaverou/pen/MWPpEQg?editors=1011

Steps to reproduce

Visit testcase

What is expected?

1 in Result pane

What is actually happening?

Error

System Info

(Not relevant)

Any additional comments?

Apparently proxies break private class fields (MDN, non-Vue testcase). This means that every time an instance of a class using private fields is used as the value of a Vue property, things break (see testcase). Since there is a workaround that can be used in the proxy traps, I'd consider this a Vue bug.

Vue was mentioned several times in tc39/proposal-class-fields#106 , so I'd be surprised if this is not known, but I couldn't find an existing issue, so opening this just in case.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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