 
 import Foundation
 
-public typealias LazyInit<Service> = () -> (Service)
+public typealias ServiceName = String
 
 public enum ServiceLocatorError: Error {
-    case duplicateService(String)
-    case duplicateLazyService(String)
+    case duplicateService(ServiceName)
+    case duplicateLazyService(ServiceName)
     case inexistentService
-    case serviceTypeMismatch(expected: String, found: String)
-    case lazyServiceTypeMismatch(expected: String, found: String)
+    case serviceTypeMismatch(expected: Any.Type, found: Any.Type)
+    case lazyServiceTypeMismatch(expected: Any.Type, found: Any.Type)
 }
 
 public final class ServiceLocator {
+
+    public typealias LazyInit<Service> = () -> (Service)
 
     private enum RegisteredService {
         case normal(Any)

        }
    }

    func get<Service>(name serviceName: String? = nil) throws -> Service {
        let name = buildName(for: Service.self, serviceName)
        var service: Service! // this will *always* contain a value if no error occurs, hence the `!` 💪



    private func validateTypeAndReturn<Service>(service anyService: Any) throws -> Service {
        guard let service = anyService as? Service else {
            throw ServiceLocatorError.serviceTypeMismatch(expected: Service.self, found: type(of: anyService))
        }

        return service
