lytics / ios-sdk

MIT License
0 stars 0 forks source link

Constrain Generics to Codable #103

Closed mgacy closed 1 year ago

mgacy commented 1 year ago

Changes generic constraints from Encodable (which supports encoding a type to an external representation like JSON) to Codable (which also supports decoding a type from an external representation). This will allow more flexibility in the future and since the compiler can automatically synthesize Codable conformance it should have no impact on usage.

To support this I added Decodable conformance to Never and throw a DecodingError.valueNotFound error in the initializer implementation.