// // Dependency.swift // DependencyInjection // // Created by Javier Cicchelli on 05/12/2022. // Copyright © 2022 Röck+Cöde. All rights reserved. // @propertyWrapper public struct Dependency { // MARK: Properties private let keyPath: WritableKeyPath // MARK: Computed public var wrappedValue: D { get { DependencyStore[keyPath] } set { DependencyStore[keyPath] = newValue } } // MARK: Initialisers public init(_ keyPath: WritableKeyPath) { self.keyPath = keyPath } }