mirror of
https://github.com/pointfreeco/swift-custom-dump.git
synced 2026-04-07 19:17:35 +00:00
15 lines
415 B
Swift
15 lines
415 B
Swift
import Foundation
|
|
|
|
extension AnyKeyPath: CustomDumpStringConvertible {
|
|
public var customDumpDescription: String {
|
|
if #available(macOS 13.3, iOS 16.4, watchOS 9.4, tvOS 16.4, *) {
|
|
return self.debugDescription
|
|
}
|
|
return """
|
|
\(typeName(Self.self))<\
|
|
\(typeName(Self.rootType, genericsAbbreviated: false)), \
|
|
\(typeName(Self.valueType, genericsAbbreviated: false))>
|
|
"""
|
|
}
|
|
}
|