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
3.5.11
https://play.vuejs.org/#eNqNk92O0zAQhV9l5Ju2UpQqzS5IoVsJ0F4sEj8C7jBCbjJJUxw7sifdVlXfnXHSAmJpu3fJzJnzHTuTvXjdtvGmQ5GJuc9d3RJ4pK4FrUx1JwV5KRbS1IbQlSpHeCBsYC8NQF1kYLpmie5VeDWqwQw8udpUXDhII02BZW3wvS1Qz8PgYixFaW0iRTR4sEB1mjIYT+BuAeN975pER7dklsJhEsF0CqNQGYFf2U4XsESwJdCuRRgNyBEjJxeYs/NM7mYgxVI5KY603DatRkK9g6IuS3RoCOxyjTld4aRnOd+SaBal3weAck7tPCjtLRQWjCWglbOPJ3eWWFqhAywqhFx59BegN+egptM6upL49txwd5worjm8eOrwHPDLp2P/IufTYSl5BfmFR1utCGG6EBGvZm5NWVfx2lvD+9s7SRE+Xa3RfWyptobXNxsYoae0to/v+hq5Dhky1PMV5j//U1/7bahJ8cmhR7dBTnzqkXIV0tC+//IBt/z8u9nYotOsvtD8jN7qLmQcZG/47Bz7L12f9qFprSNe8K/+fkto/OlQIWhQHnq9FPwTv71w9D9x0/imn+Mb5lv8sUEXPPkC0/g2ThJx+AXqA1d+
In the repro, you can see multiple defineModel() macros, none of them throw a type error, even if the types don't match the Item interface.
defineModel()
Item
e.g.:
interface Item { id: number; name: string; } defineModel<Item>("foo1", { default: () => ({ id: 1, name: 123 }), // 'name' should be of type 'string' })
A type error should be thrown for the defineModel() default values.
No type error is shown.
No response
It also behaves kinda strangely with basic types: playground
The text was updated successfully, but these errors were encountered:
defineModel
types(defineModel): fix defineModel type prompt
c603dcc
close vuejs#12145
default
PropOptions
Successfully merging a pull request may close this issue.
Vue version
3.5.11
Link to minimal reproduction
https://play.vuejs.org/#eNqNk92O0zAQhV9l5Ju2UpQqzS5IoVsJ0F4sEj8C7jBCbjJJUxw7sifdVlXfnXHSAmJpu3fJzJnzHTuTvXjdtvGmQ5GJuc9d3RJ4pK4FrUx1JwV5KRbS1IbQlSpHeCBsYC8NQF1kYLpmie5VeDWqwQw8udpUXDhII02BZW3wvS1Qz8PgYixFaW0iRTR4sEB1mjIYT+BuAeN975pER7dklsJhEsF0CqNQGYFf2U4XsESwJdCuRRgNyBEjJxeYs/NM7mYgxVI5KY603DatRkK9g6IuS3RoCOxyjTld4aRnOd+SaBal3weAck7tPCjtLRQWjCWglbOPJ3eWWFqhAywqhFx59BegN+egptM6upL49txwd5worjm8eOrwHPDLp2P/IufTYSl5BfmFR1utCGG6EBGvZm5NWVfx2lvD+9s7SRE+Xa3RfWyptobXNxsYoae0to/v+hq5Dhky1PMV5j//U1/7bahJ8cmhR7dBTnzqkXIV0tC+//IBt/z8u9nYotOsvtD8jN7qLmQcZG/47Bz7L12f9qFprSNe8K/+fkto/OlQIWhQHnq9FPwTv71w9D9x0/imn+Mb5lv8sUEXPPkC0/g2ThJx+AXqA1d+
Steps to reproduce
In the repro, you can see multiple
defineModel()
macros, none of them throw a type error, even if the types don't match theItem
interface.e.g.:
What is expected?
A type error should be thrown for the
defineModel()
default values.What is actually happening?
No type error is shown.
System Info
No response
Any additional comments?
It also behaves kinda strangely with basic types: playground
The text was updated successfully, but these errors were encountered: