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
1.Copying the code from "minimal copy" to vscode (maybe any ide with palm extension?), missing the required props header.
2.Set jsxTemplates to true
"vueCompilerOptions": {
"jsxTemplates": true,
}
What is expected?
same behavior as jsxTemplates: false
get a error like Type '{}' is not assignable to type 'Partial<{}> & Omit<Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>'. Property 'title' is missing in type '{}' but required in type 'Omit<Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>'.ts(2322) Child.vue(10, 3): 'title' is declared here.
What is actually happening?
type looks correct, but there is no error when required props are missing
Any additional comments?
For virtual files, There is no such distinction between jsxTemplates true and false.
//parent.vue
//child.vue
If the value of the prop is set, the type checking is correct. Even with jsxTemplates: true.
The text was updated successfully, but these errors were encountered:
johanninos
changed the title
No errors are thrown when required props are missing. If set jsxTemplate: true
No errors are thrown when required props are missing. If set jsxTemplates: true
Nov 23, 2022
Volar version
v1.0.9
Link to minimal reproduction
https://sfc.vuejs.org/#eNqVkD1uwzAMha9CaEkLNNLuugGKXKAH0OLatKPA+oFIpwUM372U3CFLhiwCyUd+T+SqPlPStwVVo1pGn+aO8WQDQNtf3DwYiVtzJ0hKfXaJgZCXBHMXpg+rmKwS1fkUM8O5jMKYo4eDNjUrHofC2qelV72pvf3ou6SvFIP8YS3W9l8QZgO1UmoCKLlVF+ZEjTE09oV6JR3zZCTSeQnsPGokf/zO8YcwC9iqgths2MTyHP2DfQd3qwHAurLjGTcZkbrZhSeuYAP+1ju4wJjHrkf4yjHRvktlN0CcXZje5Vc2DDi6gLWnre/p5bWa3F1r+wOQzJXC
Steps to reproduce
1.Copying the code from "minimal copy" to vscode (maybe any ide with palm extension?), missing the required props header.
2.Set jsxTemplates to true
What is expected?
same behavior as
jsxTemplates: false
get a error like
Type '{}' is not assignable to type 'Partial<{}> & Omit<Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>'. Property 'title' is missing in type '{}' but required in type 'Omit<Readonly<ExtractPropTypes<__VLS_TypePropsToRuntimeProps<Props>>> & VNodeProps & AllowedComponentProps & ComponentCustomProps, never>'.ts(2322) Child.vue(10, 3): 'title' is declared here.
What is actually happening?
type looks correct, but there is no error when required props are missing
Any additional comments?
For virtual files, There is no such distinction between jsxTemplates true and false.
//parent.vue
//child.vue
If the value of the prop is set, the type checking is correct. Even with jsxTemplates: true.
The text was updated successfully, but these errors were encountered: