Closed
Description
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
Metadata
Metadata
Assignees
Labels
No labels