You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not understand why this have an error with transpiling with vue-tsc :
import { computed, ComputedRef, UnwrapNestedRefs } from "vue";
interface ConcreteTest {
val: ComputedRef<string>;
}
interface Store {
registers: ConcreteTest[];
}
class StoreManager {
public store: UnwrapNestedRefs<Store> = {
registers: []
};
addRegisters(){
const val = computed(() => { return "0xaa" });
this.store.registers.push({ val }); // => The expected type comes from property 'val' which is declared here on type '{ val: string; }'
}
}
I do not understand why this have an error with transpiling with vue-tsc :
You can check it here : https://github.com/louis49/demo-vue-ts-computed-refs.git with npm build
The text was updated successfully, but these errors were encountered: