We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Vuejs: 2.5.16 Typescript: 2.8.1
https://stackblitz.com/edit/typescript-rrnw8z?file=index.ts
If your property of type X is not required, its type should be X | undefined
X
X | undefined
If your property of type X is not required, its type is still X
More dangerous: The properties are not required by default and you can easily write code that will fail at runtime.
Note: The stackblitz above won't show the error because the types are not correctly assumed and this is assumed as any
this
any
The text was updated successfully, but these errors were encountered:
#6901 (comment)
Sorry, something went wrong.
Will this issue be fixed in Vue 3.x ? Or how to correct it with TS 3.4+ ? 😕
No branches or pull requests
Version
Vuejs: 2.5.16
Typescript: 2.8.1
Reproduction link
https://stackblitz.com/edit/typescript-rrnw8z?file=index.ts
Steps to reproduce
What is expected?
If your property of type
X
is not required, its type should beX | undefined
What is actually happening?
If your property of type
X
is not required, its type is stillX
More dangerous: The properties are not required by default and you can easily write code that will fail at runtime.
Note: The stackblitz above won't show the error because the types are not correctly assumed and
this
is assumed asany
The text was updated successfully, but these errors were encountered: