//
//  ViewModelProtocol.swift
//  1Weather
//
//  Created by Dmitry Stepanets on 01.03.2021.
//

import UIKit

protocol ViewModelDelegate : class {
    func viewModelDidChange<P: ViewModelProtocol>(model:P)
    func viewModel<P: ViewModelProtocol>(model:P, errorHasOccured error:String?)
}

//Makes delegate methods optional
extension ViewModelDelegate {
    func viewModelDidChange<P: ViewModelProtocol>(model:P) {}
    func viewModel<P: ViewModelProtocol>(model:P, errorHasOccured error:String?) {}
}

protocol ViewModelProtocol {
}
