Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix local watcher example #93

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Commits on Mar 18, 2021

  1. Fix local watcher example

    If the `$watch` is not static, then it is part of the object constructor in TypeScript and not part of the object prototype, so it can't be accessed from [`createLocalWatchers`](https://github.com/michaelolof/vuex-class-component/blob/master/src/proxy.ts#L222).
    Glandos committed Mar 18, 2021
    Configuration menu
    Copy the full SHA
    afcdfa5 View commit details
    Browse the repository at this point in the history
  2. Type this to be able to use it

    Since the watcher is called with the class instance as `this`, tell TypeScript to use it.
    Glandos committed Mar 18, 2021
    Configuration menu
    Copy the full SHA
    3ee4604 View commit details
    Browse the repository at this point in the history