#if canImport(Combine) import Combine #endif protocol Reference: AnyObject, CustomStringConvertible, Sendable { associatedtype Value: Sendable var value: Value { get set } func access() func withMutation(_ mutation: () throws -> T) rethrows -> T #if canImport(Combine) var publisher: AnyPublisher { get } #endif } extension Reference { var valueType: Any.Type { Value.self } }