Skip to content

Instantly share code, notes, and snippets.

@marcpalmer
Created April 27, 2018 16:19
Show Gist options
  • Save marcpalmer/19b1d5f2429020127616c49d50c7b6f5 to your computer and use it in GitHub Desktop.
Save marcpalmer/19b1d5f2429020127616c49d50c7b6f5 to your computer and use it in GitHub Desktop.
Flint conditional conformance blog part 5
extension StaticActionBinding where ActionType.PresenterType == NoPresenter {
public func perform(with input: ActionType.InputType,
completion: ((ActionOutcome) -> ())? = nil) {
}
}
extension StaticActionBinding where ActionType.InputType == NoInput {
public func perform(using presenter: ActionType.PresenterType,
completion: ((ActionOutcome) -> ())? = nil) {
}
}
extension StaticActionBinding where ActionType.InputType == NoInput, ActionType.PresenterType == NoPresenter {
public func perform(completion: ((ActionOutcome) -> ())? = nil) {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment