This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol ObservableSearchBar { | |
var textDidChange: Observable<String> { get } | |
var text: String? { get set } | |
} | |
class TableViewDataSourceProvider<Item, Cell: UITableViewCell & NibLoadableView>: NSObject, UITableViewDataSource, UITableViewDelegate, UISearchResultsUpdating { | |
typealias CellConfigurator = (_ indexPath: IndexPath, _ item: Item, _ cell: Cell) -> Void | |
typealias HeightConfigurator = (_ indexPath: IndexPath, _ item: Item) -> CGFloat | |
typealias ContextMenuConfigurator = (_ indexPath: IndexPath, _ item: Item) -> UIMenu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typealias KeychainDictionary = [String: Any] | |
@propertyWrapper | |
class KeychainStorage<Model: Codable> { | |
let key: String | |
let kClass: KClass | |
let logHandler: (String) -> () | |
var projectedValue: KeychainStorage { self } | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import kotlin.reflect.KProperty | |
typealias DependencyContainer = (factory: Container) -> Unit | |
interface Resolver { | |
fun <T> resolve(type: Class<T>): T | |
fun init(apply: DependencyContainer) | |
} | |
inline fun <reified T> Resolver.resolve() = resolve(T::class.java) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
protocol Resolver { | |
func resolve<T>() -> T | |
func resolve<T>(_ type: T.Type) -> T | |
} | |
struct DependencyInjector { | |
enum InstanceType { |