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
Open in IDE with volar enabled or run vue-tsc (tested with versions 1.0.9 to 1.4.3)
TheWelcome component should show TS errors
What is expected?
Props defined with defineProps should be available in the template without the need to use const props = defineProps<...>() and props. before the prop name.
What is actually happening?
We must use const props = defineProps<...>() in the script and props. before the prop name in the template to get no error.
yyx990803
changed the title
Experimental RFC 436 - cannot use generic prop as object key in template without props
SFC generics - cannot use generic prop as object key in template without propsMay 12, 2023
Vue version
3.2.45
Link to minimal reproduction
https://github.com/cohlar/vue-rfc436/tree/prop_object_key_error
Steps to reproduce
volar
enabled or runvue-tsc
(tested with versions1.0.9
to1.4.3
)TheWelcome
component should show TS errorsWhat is expected?
Props defined with
defineProps
should be available in the template without the need to useconst props = defineProps<...>()
andprops.
before the prop name.What is actually happening?
We must use
const props = defineProps<...>()
in the script andprops.
before the prop name in the template to get no error.System Info
No response
Any additional comments?
This issue was initially raised in the volar repo and @johnsoncodehk proposed a "naive" solution.
The text was updated successfully, but these errors were encountered: