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
Trying to access scope properties of a slot in Vue 2 results in an error Property 'value' does not exist on type 'VNode[]'... ts(2551)
in #439 the workaround appears to be to assert the scoped property to a type (#oneThing="props as MyProp") but in Vue 2 trying to do that will result in an Unexpected token error at compile time.
The text was updated successfully, but these errors were encountered:
jaredmcateer
changed the title
Vue 2 errors accessing scoped properties
Vue 2 errors accessing scoped properties in slots
May 26, 2022
I've read the documentation and followed it as best I can, I noticed I missed the vueCompilerOptions section (in my test repo) and I added it but it made no difference, do you think I've missed something in my test repo?
Edit: after reloading vscode it appears the missing vueCompilerOptions in tsconfig was the actual problem.
Minimal Test Case
https://github.com/jaredmcateer/vue2-volar-type-error
Explanation
Trying to access scope properties of a slot in Vue 2 results in an error
Property 'value' does not exist on type 'VNode[]'... ts(2551)
in #439 the workaround appears to be to assert the scoped property to a type (
#oneThing="props as MyProp"
) but in Vue 2 trying to do that will result in anUnexpected token
error at compile time.The text was updated successfully, but these errors were encountered: