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
We have a fairly large vue/typescript project that occasionally runs into type issues when working with the composition api. I think it has something to do with private fields going through Ref/UnwrapRef. I think our usage is valid, but we are still getting to grips with it.
In the code below the myArray variable throws up the following error with TS 4.0.5:
import { ref } from "@vue/composition-api";
class MyClass {
private memberVariable: string = "";
}
const myArray: MyClass = ref(new MyClass()).value;
^^ TS2741: Property 'memberVariable' is missing in type '{}' but required in type 'MyClass
The text was updated successfully, but these errors were encountered:
Close for now in favor of vuejs/core#2557, please continue the discussion there. If it gets resolved and the patch gets shipped, we can then update this plugin to match their behavior.
We have a fairly large vue/typescript project that occasionally runs into type issues when working with the composition api. I think it has something to do with private fields going through Ref/UnwrapRef. I think our usage is valid, but we are still getting to grips with it.
In the code below the myArray variable throws up the following error with TS 4.0.5:
The text was updated successfully, but these errors were encountered: