I use
private(set) var foo:String
in lots of my code. It's great.
However using in a module, foo is internal - and therefore inaccessible from outside the module
is there a way to achieve ?
public(get) private(set) var foo:String
to be doubly explicit. The goal is that foo should have a getter which is accessible from outside the module, but a private setter. Using only private(set)
means that the getter is internal
- so not accessible outside the module