-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
types(reactive): UnwrapNestedRefs
is not working
#1083
Comments
I would say this is an intended behaviour, since we are bailing the types There's the original issue: #951 EDIT: If adding import { ref, reactive } from "vue";
declare global {
interface Window {
// describe this interface with some unique props
__window: boolean;
}
interface Node {
// describe this interface with some unique props
__node: boolean;
}
}
const a = reactive({ a: ref(0) });
a.a++; // works |
I think it's expected behavior to require What we can improve is that |
see b40fcbc |
@yyx990803 Thanks, and maybe you will be interested in microsoft/rushstack#1709. |
Version
3.0.0-beta.4
Reproduction link
https://codesandbox.io/s/dreamy-chandrasekhar-7pqfh
Steps to reproduce
Check
src/index.ts
line 5.What is expected?
Type of
a.a
isnumber
.What is actually happening?
Type of
a.a
isRef<number>
.See the comments in
src/index.ts
. It's weird, maybe it's a TS bug.The text was updated successfully, but these errors were encountered: