Might be handy when estimating work.
- Open Terminal
- cd to your Xcode project
- Execute the following when inside your target project:
// Reference: https://github.com/asensei/AnyCodable/blob/master/Sources/AnyCodable/AnyCodable.swift | |
import Foundation | |
public struct AnyCodable { | |
// MARK: Initialization | |
public init(_ value: Any?) { | |
self.value = value | |
} |
extension KeyedDecodingContainer { | |
func decodeIfPresent<T: Decodable>(key: K) throws -> T? { | |
return try decodeIfPresent(T.self, forKey: key) | |
} | |
func decode<T: Decodable>(key: K) throws -> T { | |
return try decode(T.self, forKey: key) | |
} | |
} |
public class Channel<Value> { | |
private class Subscription { | |
weak var object: AnyObject? | |
private let notifyBlock: (Value) -> Void | |
private let queue: DispatchQueue | |
var isValid: Bool { | |
return object != nil |
import XCTest | |
struct Scenario: ScenarioGivenContinuation, ScenarioWhenContinuation { | |
init(_ description: String) { | |
print("Scenario: \(description)") | |
} | |
struct Given: ScenarioWhenContinuation { | |
fileprivate init(description: String, setup: () throws -> Void) rethrows { |