-
-
Notifications
You must be signed in to change notification settings - Fork 512
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-edge-case
Description
Vue - Official extension or vue-tsc version
3.0.0-alpha.0
VSCode version
1.98.1
Vue version
3.5.13
TypeScript version
5.8.2
System Info
package.json dependencies
{
"dependencies": {
"vue": "^3.5.13"
}
}Steps to reproduce
- Copy and paste into a new
.vuefile:
<template>
<div>{{ test }}</div>
</template>
<script setup>
// @ts-check
import { ref } from 'vue';
/** @import { Ref } from 'vue' */
const modelValue = defineModel({
type: Boolean,
default: false,
});
/** @type {Ref<string | null>} */
const test = ref('123');
</script>
- Should see that there is an error on line 16:
- If you move the
/** @import { Ref } from 'vue' */afterdefineModelstatement, then it works correctly:
What is expected?
Ref type or any type imported just before defineModel should be recognized correctly.
What is actually happening?
Ref type or any type imported just before defineModel is not being recognized.
Link to minimal reproduction
No response
Any additional comments?
I'm not able to reproduce it in the Vue SFC Playground.
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-edge-case


