-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Uncomment types for Record, fix for .equals #876
Conversation
The Record type refs work as of Flow version 0.24.2. The .equals method on `_Iterable` was causing Set.equals to not accept another Set. This seems to fix it.
type-definitions/immutable.js.flow
Outdated
declare class Record<T: Object> { | ||
static <T: Object>(spec: T, name?: string): /*T & Record<T>*/any; | ||
static <T: Object>(spec: T, name?: string): T & Record<T>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, are you sure that this line is correct? Isn't it supposed to be (I have checked it only with flow 0.26, so maybe it is working with 0.24):
static <T: Object>(spec: T, name?: string): Class<T & Record<T>>;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you're right about this. I checked the other cases, and so I just uncommented the things I saw. I'll fix this.
Fixed outstanding issues. Added the @tallixun would love another review |
Hey @nmn. I would love to see your PR merged. However, there are a few method definitions missing. So far I found:
I think it would make sense to extend from |
So #878 refactored the flow types and also added tests for them. Would you mind updating this PR to merge those changes in, and also add a test that catches this? Thanks! |
Hi there. I am starting handling backlog. I know it is been a while since you've submitted PR, sorry for such delay. The are some conflicts. Could you, please, rebase? 😅 |
The equals() function should really accept anything. As discussed in #876
The equals() function should really accept anything. As discussed in #876
The Record type refs work as of Flow version 0.24.2.
The .equals method on
_Iterable
was causing Set.equals to not accept another Set. This seems to fix it.