Computed Vue Property with Getter & Setter won't compile in Webpack Computed Vue Property with Getter & Setter won't compile in Webpack vue.js vue.js

Computed Vue Property with Getter & Setter won't compile in Webpack


Wow, figured it out.

I was missing the type declaration for "value" and it broke everything. FUN

        get(): any[] {            return this.$store.getters["homeList/sortedPriority"];        },        set(value:any): void {            var test = 1;        }


If you are using vue-property-decorator you can do the following

import { Component, Vue } from "vue-property-decorator"@Componentexport default class GetterSetterTest extends Vue {  get prioritized() {    return this.$store.getters["blah"];  }  set prioritized(value: any) {     // set the value something like below     this.$store.commit(.......)  }}