Closed DevVenusK closed 1 year ago
@DevVenusK thanks for your contribution! I don't fully understand the issue that this fixes. Would you mind posting a reproduction case? For bonus points, and unit test would be great as well.
@ZevEisenberg Currently we have to use it like this to use the compose method.
.composed(of: [ "apple".styled(...), "is delicious".styled(...) ])
However, if you use the Variadic Parameters, you can do this.
.composed(of: "apple".styled(...), "is delicious".styled(...) )
I just changed the parameter :) I really like the missing [].
Ah, now I understand. Can you perhaps simplify the code by calling through to an existing function, passing along the array from the variadic parameters, instead of duplicating the whole function body?
good idea! I fixed it! Would you mind posting a description?
A description of what?
Sorry, I meant documentation comments, not a description. Is it okay to use the documentation comments of this method as is?
Oh, I hadn't thought of that thanks. Edited.
Looking good! I'd still like to see a unit test to make sure we don't break this syntax in future.
Write unit test for variadic parameter. 🙇🏻♂️
Nice test! Let's get the whitespace cleaned up and then we're good to merge.
Nice test! Let's get the whitespace cleaned up and then we're good to merge.
done!
@ZevEisenberg Do you have any idea when this PR will be merged?
Sorry, I've been procrastinating on it because I don't know if our CocoaPods release process works any more. I'll see what I can do.
Merged, but having trouble with the CocoaPods release, as anticipated. Working on it.
But you can use it with SPM now because the tag is pushed.
thx!! 🤩
@DevVenusK @ZevEisenberg THe cocoapods 6.1.2 is published as well
[] can be removed when using the composed method. Overloading methods for optional use.