Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property wrappers #225

Merged
merged 9 commits into from
Nov 10, 2019
Merged

Property wrappers #225

merged 9 commits into from
Nov 10, 2019

Conversation

ilyapuchka
Copy link
Collaborator

@ilyapuchka ilyapuchka commented Jun 30, 2019

By adding @propertyDelegate to our existing auto-injection wrappers instead of

let client = Injected<Client>()

in Swift 5.1 we can write

@Injected var client: Client? = nil

Note: as of Xcode 11 beta 1 () are needed after property delegate name
UPD: Not an issue any more with refactoring of property wrappers into structs, but still requires initial nil value provided explicitly when using property wrapper (example updated) in class (not needed in structs)

UPD: = nil is not needed any more

@ilyapuchka ilyapuchka force-pushed the property-delegates branch from b599295 to 3b421d0 Compare July 7, 2019 15:16
@ilyapuchka ilyapuchka changed the title Property delegates Property wrappers Jul 13, 2019
@dchohfi
Copy link
Contributor

dchohfi commented Nov 4, 2019

hey @ilyapuchka, thoughts on this? I might be able to pick it and see what is left

@ilyapuchka ilyapuchka merged commit 05c02c9 into develop Nov 10, 2019
@ilyapuchka ilyapuchka deleted the property-delegates branch November 10, 2019 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants