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
When setting strict: false in tsConfig, and using defineProps with an optional property, there are type-checking errors when the prop is used in the template.
What is actually happening?
The following type error is generated:
app.vue:10:22 - error TS2339: Property 'links' does not exist on type 'CreateComponentPublicInstanceWithMixins<ToResolvedProps<{}, {}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, VNodeProps & AllowedComponentProps & ComponentCustomProps & Readonly<...> & Readonly<...>, ... 16 more ..., {}>'.
10 <div :data-test="!!links" />
~~~~~
Vue - Official extension or vue-tsc version
2.1.6
VSCode version
n/a
Vue version
3.5.3
TypeScript version
5.5.4
System Info
No response
package.json dependencies
Steps to reproduce
Set
strict: false
in typescript compiler options, and use a component like this:What is expected?
When setting
strict: false
intsConfig
, and using defineProps with an optional property, there are type-checking errors when the prop is used in the template.What is actually happening?
The following type error is generated:
Link to minimal reproduction
https://stackblitz.com/edit/github-m6twm5?file=app.vue,nuxt.config.ts,package.json
Any additional comments?
Update this seems to be stemming from an update in Vue v3.5 rather than the Volar v2.1 release.
The text was updated successfully, but these errors were encountered: