One common issue I have encountered is trying to access a method from a child component. It usually works fine, but sometimes additional steps are needed.
this.$refs.searchInput.reset()
To satisfy TypeScript's requirements, you may need to do the following:
(this.$refs.searchInput as HTMLFormElement).reset()
The syntax can be a bit cumbersome at times. Is there a way to simplify this within the component options?
export default Vue.extend({
name: 'UserForm',
components: {
SearchInput as HTMLFORMELEMENT
}
Consider utilizing the class/decorator syntax to potentially streamline this process.