-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Type inference is wrong #38261
Comments
This is not an typescript issue, this is an issue of vue |
|
At runtime, |
The problem is that Vue 3 expects If we had opaque placeholder types/forward declarations (#31894) for A hack that Vue 3.0 can make in the meantime is add some global declarations that are certain not to conflict for interface Node {
nodeName: string;
nodeType: number;
textContent: string;
} |
Thanks @DanielRosenwasser - tracking in vuejs/core#1083, I think we can close this one. |
Thanks everyone, as you said this is not an typescript issue. |
TypeScript Version:
3.8.3
Search Terms:
type inference
Reproduction link:
https://codesandbox.io/s/dreamy-chandrasekhar-7pqfh
Steps to reproduce:
Check
src/index.ts
line 5.Expected behavior:
Type of
a.a
isnumber
.Actual behavior:
Type of
a.a
isRef<number>
.Related Issues:
vuejs/core#1083
See the comments in
src/index.ts
.The text was updated successfully, but these errors were encountered: