-
-
Notifications
You must be signed in to change notification settings - Fork 484
Labels
good reproduction ✨This issue provides a good reproduction, we will be able to investigate it firstThis issue provides a good reproduction, we will be able to investigate it first🍰 p2-nice-to-have
Description
Vue - Official extension or vue-tsc version
2.2
VSCode version
latest
Vue version
3.5.13
TypeScript version
5.7.3
System Info
package.json dependencies
Steps to reproduce
Create a .vue
SFC file and add defineModel
clause with default value set
<script lang="ts" setup>
// ...
/**
* Should the modal be open?
*/
const isOpen = defineModel<boolean>('isOpen', { default: false })
</script>
Run the component through the basic checker and observe lack of default value in returned object.
What is expected?
{
"default": false,
"name": "isOpen",
"global": false,
"description": "Should the modal be open?",
"tags": [],
"required": false,
"type": "boolean",
"declarations": [],
"schema": {
"kind": "enum",
"type": "boolean",
"schema": [
"false",
"true"
]
}
}
What is actually happening?
{
"name": "isOpen",
"global": false,
"description": "", // Also no description - see https://github.com/vuejs/language-tools/issues/4592
"tags": [],
"required": false,
"type": "boolean",
"declarations": [],
"schema": {
"kind": "enum",
"type": "boolean",
"schema": [
"false",
"true"
]
}
}
Link to minimal reproduction
No response
Any additional comments?
No response
Metadata
Metadata
Assignees
Labels
good reproduction ✨This issue provides a good reproduction, we will be able to investigate it firstThis issue provides a good reproduction, we will be able to investigate it first🍰 p2-nice-to-have