Describe the bug
If try to access a variable of an hook with a child component, the vue-tsc give an error. wrapper.vm does not have a stateForm property, because wrapper.vm is typed as ComponentPublicInstance.
To Reproduce
https://stackblitz.com/edit/vitest-dev-vitest-ztd6bn
Expected behavior
No error.
Related information:
See #972
Tested with #2026
Workaround
const childComp = wrapper.findComponent(ChildComp);
const childWrapper = mount(childComp);
expect(childWrapper.vm.stateForm.length).toBe(undefined);