|
11 | 11 | public enum DynamicCodable: Equatable, Hashable { |
12 | 12 | /// A value coded using a keyed container such as a dictionary. |
13 | 13 | /// - Tag: DynamicCodable.keyed |
14 | | - case keyed([Key : Self]) |
| 14 | + case keyed(Keyed) |
15 | 15 |
|
16 | 16 | /// A value coded using a keyed container such as an array. |
17 | 17 | /// - Tag: DynamicCodable.unkeyed |
18 | | - case unkeyed([Self]) |
| 18 | + case unkeyed(Unkeyed) |
19 | 19 |
|
20 | 20 | /// A value coding nil as a single value container. |
21 | 21 | /// - Tag: DynamicCodable.nil |
@@ -80,6 +80,80 @@ public enum DynamicCodable: Equatable, Hashable { |
80 | 80 | /// A (rare) value coding an empty single value container. Only certain decoders may even support this. |
81 | 81 | /// - Tag: DynamicCodable.empty |
82 | 82 | case empty |
| 83 | + |
| 84 | + // MARK: - DynamicCodableTypes |
| 85 | + |
| 86 | + /// The underlying type for [.keyed](x-source-tag://DynamicCodable.keyed) values. |
| 87 | + /// - Tag: DynamicCodable.Keyed |
| 88 | + public typealias Keyed = [DynamicCodable.Key : DynamicCodable] |
| 89 | + |
| 90 | + /// The underlying type for [.unkeyed](x-source-tag://DynamicCodable.unkeyed) values. |
| 91 | + /// - Tag: DynamicCodable.Unkeyed |
| 92 | + public typealias Unkeyed = [DynamicCodable] |
| 93 | + |
| 94 | + /// The underlying type for [.nil](x-source-tag://DynamicCodable.nil) values. |
| 95 | + /// - Tag: DynamicCodable.Nil |
| 96 | + public typealias Nil = Optional<Any> |
| 97 | + |
| 98 | + /// The underlying type for [.bool](x-source-tag://DynamicCodable.bool) values. |
| 99 | + /// - Tag: DynamicCodable.Bool |
| 100 | + public typealias Bool = Swift.Bool |
| 101 | + |
| 102 | + /// The underlying type for [.string](x-source-tag://DynamicCodable.string) values. |
| 103 | + /// - Tag: DynamicCodable.String |
| 104 | + public typealias String = Swift.String |
| 105 | + |
| 106 | + /// The underlying type for [.float64](x-source-tag://DynamicCodable.float64) values. |
| 107 | + /// - Tag: DynamicCodable.Float64 |
| 108 | + public typealias Float64 = Swift.Float64 |
| 109 | + |
| 110 | + /// The underlying type for [.float32](x-source-tag://DynamicCodable.float32) values. |
| 111 | + /// - Tag: DynamicCodable.Float32 |
| 112 | + public typealias Float32 = Swift.Float32 |
| 113 | + |
| 114 | + /// The underlying type for [.int](x-source-tag://DynamicCodable.int) values. |
| 115 | + /// - Tag: DynamicCodable.Int |
| 116 | + public typealias Int = Swift.Int |
| 117 | + |
| 118 | + /// The underlying type for [.int8](x-source-tag://DynamicCodable.int8) values. |
| 119 | + /// - Tag: DynamicCodable.Int8 |
| 120 | + public typealias Int8 = Swift.Int8 |
| 121 | + |
| 122 | + /// The underlying type for [.int16](x-source-tag://DynamicCodable.int16) values. |
| 123 | + /// - Tag: DynamicCodable.Int16 |
| 124 | + public typealias Int16 = Swift.Int16 |
| 125 | + |
| 126 | + /// The underlying type for [.int32](x-source-tag://DynamicCodable.int32) values. |
| 127 | + /// - Tag: DynamicCodable.Int32 |
| 128 | + public typealias Int32 = Swift.Int32 |
| 129 | + |
| 130 | + /// The underlying type for [.int64](x-source-tag://DynamicCodable.int64) values. |
| 131 | + /// - Tag: DynamicCodable.Int64 |
| 132 | + public typealias Int64 = Swift.Int64 |
| 133 | + |
| 134 | + /// The underlying type for [.uint](x-source-tag://DynamicCodable.uint) values. |
| 135 | + /// - Tag: DynamicCodable.UInt |
| 136 | + public typealias UInt = Swift.UInt |
| 137 | + |
| 138 | + /// The underlying type for [.uint8](x-source-tag://DynamicCodable.uint8) values. |
| 139 | + /// - Tag: DynamicCodable.UInt8 |
| 140 | + public typealias UInt8 = Swift.UInt8 |
| 141 | + |
| 142 | + /// The underlying type for [.uint16](x-source-tag://DynamicCodable.uint16) values. |
| 143 | + /// - Tag: DynamicCodable.UInt16 |
| 144 | + public typealias UInt16 = Swift.UInt16 |
| 145 | + |
| 146 | + /// The underlying type for [.uint32](x-source-tag://DynamicCodable.uint32) values. |
| 147 | + /// - Tag: DynamicCodable.UInt32 |
| 148 | + public typealias UInt32 = Swift.UInt32 |
| 149 | + |
| 150 | + /// The underlying type for [.uint64](x-source-tag://DynamicCodable.uint64) values. |
| 151 | + /// - Tag: DynamicCodable.UInt64 |
| 152 | + public typealias UInt64 = Swift.UInt64 |
| 153 | + |
| 154 | + /// The underlying type for [.empty](x-source-tag://DynamicCodable.empty) values. |
| 155 | + /// - Tag: DynamicCodable.Empty |
| 156 | + public typealias Empty = Swift.Void |
83 | 157 | } |
84 | 158 |
|
85 | 159 | extension DynamicCodable { |
|
0 commit comments