ref<SomeType>(value) not pass vue-tsc validation. Why? #12970
Unanswered
GoodDayForSurf
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi.
I came across a strange error in vue-tsc validation of this code:
This code doesn't pass vue-tsc validation, I get an error:
Without using ref() (directly setting properties as items) everything is ok.
Errors occur only if
ref<Item[]>(items)
is used. But ifref(items)
is used there is second case:for interface:
vue-tsc checking will be OK only if items have the same set of properties.
if itmes = [{ id: 1 }, { id: 2, flag: true }] I get error:
Is it bug or feature?
Beta Was this translation helpful? Give feedback.
All reactions