Closed marty-suzuki closed 5 years ago
Warnings | |
---|---|
:warning: | Big PR, try to keep changes smaller if you can |
:warning: | Any changes to library code should be reflected in the Changelog. |
Generated by :no_entry_sign: Danger Swift against 15d7c8dda8f534d82071c76e682e4d773328947c
Hey @marty-suzuki! First of all thanks so much for this PR, you've did an amazing job and you must've spent quite some time to get this one working. I really appreciate that.
I also love the idea that we could use @dynamicMemberLookup
- and I didn't know that we can get code completion on that! I played with it a little and it works awesome.
I would need some time to get familiar with it so I can make a good review, but just wanted to let you know that I really like this one!
This PR has KeyPath dynamicMemberLookup support in Swift 5.1!
Here is example usage:
I've add a
DefaultsAdapter
class to realize above usages because UserDefaults can't support@dynamincMemberLookup
annotation. In addition, I've defined conventional SwiftyUserDefaults interfaces toDefaultsType
. DefaultsAdapter is adapted DefaultsType, so those work as conventional SwiftyUserDefaults too.