-
Notifications
You must be signed in to change notification settings - Fork 43
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
Added support for NSSet properties #91
Conversation
🚫 CI failed with log |
🚫 CI failed with log |
@@ -100,6 +102,15 @@ - (instancetype)initWithModelDictionary:(NS_VALID_UNTIL_END_OF_SCOPE NSDictionar | |||
} | |||
} | |||
{ | |||
__unsafe_unretained id value = modelDictionary[@"contributors"]; // Collection will retain. |
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.
Doesn't this need to be converted to NSSet
?
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.
Good catch. I just added it.
NSMutableSet *result0 = [NSMutableSet setWithCapacity:items0.count]; | ||
for (id obj0 in items0) { | ||
if (obj0 != (id)kCFNull) { | ||
[result0 addObject:[obj0 dictionaryRepresentation]]; |
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.
I think we're going to have to add a cast here to avoid hitting warnings for strict selector matching. Added an issue here #90
+counts: ?{ +[string]: number } /* Integer */, | ||
+created_at: ?PlankDate, | ||
+contributors: ?Set<UserType>, |
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.
@maicki - Can you sign off on the flow changes?
|
||
export type BoardType = $Shape<{| | ||
+name: ?string, | ||
+id: ?string, | ||
+image: ?ImageType, | ||
+image: ImageType, |
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.
Why did this change? Seems not related to this change though.
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.
@maicki I don't know exactly. This was all generated code.
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.
Flow looks good to me
Generated by 🚫 Danger |
@rahul-malik LGTM merge whenever |
Taking #70 as inspiration for how to spec it, this PR takes into consideration the
unique
key that can be defined forarray
properties. Is set, instead of creating aNSArray
, it will create aNSSet
instead.Example: