Small library to check injections into Swift objects.
/// Injection check function.
///
/// Looks through all object properties using Mirror and checks property value.
///
/// Throws error if something is nil.
///
/// Accepts array of properties to ignore.
///
/// - parameter object: object to check no ininjected dependencies
/// - parameter selectorsToIgnore: array of properties selectors to ignore during check.
/// Should conform to IgnorableSelector protocol.
/// String, #Selector(getter:) and #keyPath are accepted out of the box.
///
/// - returns original object
///
/// - throws InjectionsCheckError.uninjectedVars - found uninjected properties.
///
func checkInjections<ObjectType>(_ object: ObjectType, ignoring selectorsToIgnore: [SelectorName] = []) throws -> ObjectType
/// Injection check function.
///
/// Looks through all object properties using Mirror and checks property value.
///
/// Throws error if something is nil.
///
/// Accepts array of properties to ignore.
///
/// **This methods only works if there's DEBUG or INJECTION_CHECK_ENABLED is defined in swift.**
/// Use -DDEBUG or -DINJECTION_CHECK_ENABLED in OTHER_SWIFT_FLAGS
///
/// - parameter object: object to check no ininjected dependencies
/// - parameter selectorsToIgnore: array of properties selectors to ignore during check.
/// Should conform to IgnorableSelector protocol.
/// String, #Selector(getter:) and #keyPath are accepted out of the box.
///
/// - returns original object
///
/// - throws InjectionsCheckError.uninjectedVars - found uninjected properties.
///
@discardableResult public func debugCheckInjections<ObjectType>(_ object: ObjectType, ignoring selectorsToIgnore: [SelectorName] = [], errorClosure: (_ error: Error) -> Void = { fatalError("Injection check error: \($0)") }) -> ObjectType?