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
测试用例/demo demo.zip
hooks.ts
test.vue
如果在函数中使用了抛出的值 / If an thrown value is used in a function 这里a会被推断为any / Here, variable a will be inferred as any
将test 函数中的a引用注销,推断恢复 / Unregister the reference to a in the test function and infer recovery
尝试去掉泛型,类型推断正常 / Attempting to remove generics, type inference is normal
例子最终运行结果正常,但是ts推断异常 / The final running result of the example is normal, but ts inference is abnormal
Vue - Official: v2.0.16 VSCode: v1.89.0 系统: Windows 11 框架: vite vue3
The text was updated successfully, but these errors were encountered:
What is AnyObject?
AnyObject
Sorry, something went wrong.
What is AnyObject? 就是 { [key: string]: any; }
{ [key: string]: any; }
能复现了?
I think this is not related to the Vue language tools. In plain TypeScript you can also get this error:
Closed due to answered in #4341 (comment).
No branches or pull requests
测试用例/demo
demo.zip
hooks.ts
test.vue
如果在函数中使用了抛出的值 / If an thrown value is used in a function
这里a会被推断为any / Here, variable a will be inferred as any
将test 函数中的a引用注销,推断恢复 / Unregister the reference to a in the test function and infer recovery
尝试去掉泛型,类型推断正常 / Attempting to remove generics, type inference is normal
例子最终运行结果正常,但是ts推断异常 / The final running result of the example is normal, but ts inference is abnormal
Vue - Official: v2.0.16
VSCode: v1.89.0
系统: Windows 11
框架: vite vue3
The text was updated successfully, but these errors were encountered: