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
When the props and emit type do not match, the Vue Typescript checker does not complain, why is that? When working with :model-value and @update it becomes type safe.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When the
props
andemit
type do not match, the Vue Typescript checker does not complain, why is that? When working with:model-value
and@update
it becomes type safe.For example: prop=string and emit=string|null
https://play.vuejs.org/#eNqFUslOwzAQ/ZWRL20l2h56K2nFoh7gABUgLphDlE5DimNbXkqkkH9n7LRphFhunnmzvPF7NbvUerL3yOYssZkptAOLzmsQqcwXnDnL2ZLLotTKOKjB4BYa2BpVwoDaBh10rUrd5jmbTEMUxnLGJZeZktZBaXNYhAGJdaaQ+XI4GIy4TKbtXtpCgcNSi9QhRQBJHLofl2qDgsjQBM5g2sPmERrvU+GxK7jwekMjvmHDagSLJQxbGtXoMCmZdivZGZ1LXLdFPtlZJelP6rCKs4x2FQLNvXYF3cLZHCISsFQI9XEbc854PDvmszfM3n/I72wVcpytDVo0e/qjDnOpydG18OrxDit6dyCd4wVV/wE+oFXCB45t2ZWXG6Ldq4tsb6JkJMGTXVUOpT0eFYiGyibWc0YKhm/+7fQT3dlkFvu4bOgXj+r/Y6rWFtoobUmRDW4LiesQJTVE7Z6DdHNo7QLNcjg6P9kJy8J1bSsKqC1w6He+HFo/QXohXqm7G9Kz3cl0fTM0X68XC2A=
Vue-tsc (version 2.0.6) output:
It only hunts at the second invocation
Beta Was this translation helpful? Give feedback.
All reactions