Issue seeing when reusing composable
anish714 opened this issue · comments
Reusable composable:
`
import { defineComponent, reactive, ref, toRefs } from "@vue/composition-api";
const userConfiguration = defineComponent({
name: "abc",
props: {},
setup() {
const val = ref("");
const breweries = reactive({ list: [] });
const submitted = async () => {
console.log("submitted called");
};
return { val, ...toRefs(breweries), submitted };
},
// type inference enabled
});
export { userConfiguration };`
In component:
setup() { const state = reactive({ name: "Link", }); const { val } = userConfiguration(); }
Gives this error: Value of type 'VueProxy<{}, { submitted: () => Promise; list: Ref<never[]>; val: Ref; }, Data, {}, {}, {}, {}, {}>' is not callable. Did you mean to include 'new'?Vetur(2348)
When using Typescript and Vue Class Component
Stale issue message