Closed hbmartin closed 1 year ago
@hbmartin Can you make this PR for didSet
and then open separate ones for private(set)
and adding list calls?
@hbmartin Swift supports any visibility (open, public, internal, private) on a field setter. I've implemented this in PR #77.
You use it as follows:
PropertySpec.varBuilder("test", STRING, PUBLIC)
.mutableVisibility(PRIVATE)
.build()
PR #79 adds support for willSet
and didSet
observers.
Simple usage...
PropertySpec.varBuilder("test", STRING)
.didSet(FunctionSpec.willSetBuilder(...))
.willSet(FunctionSpec.didSetBuilder(...))
Closing PR because these features have been implemented.
Hi @hbmartin thanks for the contribution 🙌. I will go over it in the next few days.
That being said... please don't group unrelated changes into a PR (e.g. your varargs change to
DeclaredTypeName
). It makes generating changes in releases a lot harder.