-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
New issue
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
Ref sugar type error #4433
Comments
Another problem: import { ref } from 'vue';
let ref1 = $(ref()); // any
let ref2 = $ref();
// {
// [RefMarker]?: any;
// }
ref1 = 'hello world';
ref2 = 'hello world';
// 类型“"hello world"”与类型“{ [RefMarker]?: any; }”不具有相同的属性。ts(2559)
console.log(ref1, ref2); |
because 'vue-next/packages/vue/package.json' files not includes 'ref-macros.d.ts', so npm store not have this file |
@orziz yes, same for me, seems the
in env.d.ts doesn't fix TS errors |
same problem,the file is hasn't export ,but you can copy from https://github.com/vuejs/vue-next/blob/master/packages/vue/ref-macros.d.ts and create ref-macros.d.ts file in local |
Seeing the same thing as @zct1989, no ref-macros anywhere in |
updated to v3.2.7, but this issues is still not fixed. |
Hi, @yyx990803 |
Version
3.2.6
Reproduction link
SFC Playground
Steps to reproduce
Copy to VSCode and enable Volar
What is expected?
fix this error
What is actually happening?
If
& { [RefMarker]?: any };
is removed, the issue is just fixed.By the way I added ref types, but it doesn't working.
node_modules/vue/ref-macros.d.ts
seems doesn't exist.The text was updated successfully, but these errors were encountered: