     }
 
     public struct EncodingStrategy<T: Encodable> {
-        public typealias Closure = (T, Swift.Encoder) throws -> Void
+        public typealias Closure = (T, Encoder) throws -> Void
         public init(identifiers: [ObjectIdentifier], closure: @escaping Closure) {
             self.identifiers = identifiers
             self.closure = closure

}

extension ObjectEncoder.EncodingStrategy where T == Double {
    public static let throwOnNonConformingFloat = ObjectEncoder.DoubleEncodingStrategy.custom {
        guard let encoder = $1 as? ObjectEncoder.Encoder else {
            fatalError("unreachable")
        }
        guard !$0.isInfinite && !$0.isNaN else {
            throw _invalidFloatingPointValue($0, at: encoder.codingPath)
        }
        encoder.object = NSNumber(value: $0)
    }

    public static func convertNonConformingFloatToString(_ positiveInfinity: String,
                                                         _ negativeInfinity: String,
                                                         _ nan: String) -> ObjectEncoder.DoubleEncodingStrategy {
        return .custom {
            guard let encoder = $1 as? ObjectEncoder.Encoder else {
                fatalError("unreachable")
            }
            if $0 == .infinity {
                encoder.object = positiveInfinity
            } else if $0 == -.infinity {
                encoder.object = negativeInfinity
            } else if $0.isNaN {
                encoder.object = nan
            } else {
                encoder.object = NSNumber(value: $0)
            }
        }
    }

    public static let deferredToDate: ObjectEncoder.DateEncodingStrategy? = nil

    /// Encode the `Date` as a UNIX timestamp (as a `Double`).
    public static let secondsSince1970 = ObjectEncoder.DateEncodingStrategy.custom { date, encoder in
        var container = encoder.singleValueContainer()
        try container.encode(date.timeIntervalSince1970)
    }

    /// Encode the `Date` as UNIX millisecond timestamp (as a `Double`).
    public static let millisecondsSince1970 = ObjectEncoder.DateEncodingStrategy.custom { date, encoder in
        var container = encoder.singleValueContainer()
        try container.encode(1000.0 * date.timeIntervalSince1970)
    }

    /// Encode the `Date` as an ISO-8601-formatted string (in RFC 3339 format).
    @available(OSX 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
    public static let iso8601 = ObjectEncoder.DateEncodingStrategy.custom { date, encoder in
        var container = encoder.singleValueContainer()
        try container.encode(iso8601Formatter.string(from: date))
    }

    /// Encode the `Date` as a string formatted by the given formatter.
    public static func formatted(_ formatter: DateFormatter) -> ObjectEncoder.DateEncodingStrategy {
        return .custom { date, encoder in
            var container = encoder.singleValueContainer()
            try container.encode(formatter.string(from: date))
        }
    }

