This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
protocol MigratableObjectProtocol: Codable { | |
associatedtype PreviousObject: Codable | |
init(previousObject: PreviousObject) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
public struct NonEmptyArray<Element> { | |
fileprivate var elements: [Element] | |
public init(elements: Element...) { | |
self.elements = elements | |
} | |
public var count: Int { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
public protocol JSONKey: RawRepresentable, Hashable { | |
var stringValue: String { get } | |
} | |
extension JSONKey where Self.RawValue == String { | |
public var stringValue: String { | |
return rawValue | |
} |