mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-11 20:00:30 +01:00
Access control #228
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @VincentSit on GitHub (Aug 12, 2018).
I am trying to use CoreStore in my project, I found that all fields in the Demo are declared with
let, and there seems to be no way to set access controls, i.e. read-only variables.A very common usage scenario is:
In the above example, I want to only allow
nameto be modified inside the class, the external can only be read.What should I do?
@JohnEstropia commented on GitHub (Sep 10, 2018):
Make the property
privateand expose it through a computed property:@VincentSit commented on GitHub (Sep 21, 2018):
Thank you.