defineEmits typed not working when use export of type
Vue version
3.2.41
Link to minimal reproduction
Steps to reproduce
- create file, emits.ts and create a interface and export
- set the interface created for type on defineEmits
What is expected?
not show error
What is actually happening?
show error: [vite] Internal server error: [@vue/compiler-sfc] type argument passed to defineEmits() must be a function type, a literal type with call signatures, or a reference to the above types.
System Info
System:
OS: Windows 10 10.0.22621
CPU: (16) x64 AMD Ryzen 7 3800X 8-Core Processor
Memory: 20.44 GB / 31.92 GB
Binaries:
Node: 16.18.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 8.19.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Spartan (44.22621.525.0), Chromium (106.0.1370.42)
Internet Explorer: 11.0.22621.1
npmPackages:
vue: ^3.2.41 => 3.2.41
Any additional comments?
I am using nuxt 3 for the project