-
-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(language-core): should not make $props
optional
#4878
base: master
Are you sure you want to change the base?
Conversation
$props
optional
vue-component-meta
@vue/language-plugin-pug
@vue/language-core
@vue/language-server
vue-component-type-helpers
@vue/language-service
vue-tsc
@vue/typescript-plugin
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
yield `$props: __VLS_makeOptional(${scriptSetupRanges.props.name ?? `__VLS_props`}),${newLine}`; | ||
yield `$props: ${scriptSetupRanges.props.name ?? `__VLS_props`},${newLine}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is correct in general.
Try with a component with props:
msg: {
type: String,
default: null
}
In that case the prop should be optional but won't.
I feel like that might need coordination with changes in Vue types.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just add a test case in 3557d8b
(#4878) for this.
fix #4876