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
Property 'bar' is incompatible with index signature.
Type 'BarComponent | undefined' is not assignable to type 'Vue | Element | Vue[] | Element[]'.
Setting a ref as possibly undefined should be allowed to correctly type cases handling async logic. In the below case the ref would be undefined if the component unmounted during the async operation:
Currently,
$refs
annotations on a class-based component don't allow you to mark them as possiblyundefined
:The above doesn't compile:
Setting a ref as possibly
undefined
should be allowed to correctly type cases handling async logic. In the below case the ref would be undefined if the component unmounted during the async operation:Marking the ref as
BarComponent | undefined
would enforce checking the ref before using it:Currently, however, the types don't allow this.
The text was updated successfully, but these errors were encountered: