ref in template typescript error? #1003
Answered
by
xiaoxiangmoe
lovetingyuan
asked this question in
Q&A
-
Beta Was this translation helpful? Give feedback.
Answered by
xiaoxiangmoe
Mar 16, 2022
Replies: 1 comment 1 reply
-
Can you provide a minimal reproducible demo? Maybe the Try this: import {type Ref} from 'vue'
// ...
const formData2: Ref<{[x:string]: any}> = formData; If type is not same, this will throw error. |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
lovetingyuan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you provide a minimal reproducible demo?
Maybe the
Ref<T>
type of formData and theRef<T>
type from vue is not same.Try this:
If type is not same, this will throw error.