|
109 | 109 | AppStorageKey(key, store: store)
|
110 | 110 | }
|
111 | 111 |
|
112 |
| - /// Creates a shared key that can read and write a Codable value to user defaults. |
| 112 | + /// Creates a shared key that can read and write a codable value to user defaults. |
113 | 113 | ///
|
114 | 114 | /// - Parameters:
|
115 | 115 | /// - key: The key to read and write the value to in the user defaults store.
|
116 | 116 | /// - store: The user defaults store to read and write to. A value of `nil` will use the user
|
117 | 117 | /// default store from dependencies.
|
118 | 118 | /// - Returns: A user defaults shared key.
|
| 119 | + @_disfavoredOverload |
119 | 120 | public static func appStorage<Value: Codable>(
|
120 | 121 | _ key: String, store: UserDefaults? = nil
|
121 | 122 | ) -> Self
|
|
249 | 250 | AppStorageKey(key, store: store)
|
250 | 251 | }
|
251 | 252 |
|
252 |
| - /// Creates a shared key that can read and write a Codable value to user defaults. |
| 253 | + /// Creates a shared key that can read and write a codable value to user defaults. |
253 | 254 | ///
|
254 | 255 | /// - Parameters:
|
255 | 256 | /// - key: The key to read and write the value to in the user defaults store.
|
256 | 257 | /// - store: The user defaults store to read and write to. A value of `nil` will use the user
|
257 | 258 | /// default store from dependencies.
|
258 | 259 | /// - Returns: A user defaults shared key.
|
| 260 | + @_disfavoredOverload |
259 | 261 | public static func appStorage<Value: Codable>(
|
260 | 262 | _ key: String, store: UserDefaults? = nil
|
261 | 263 | ) -> Self
|
|
373 | 375 | fileprivate init(_ key: String, store: UserDefaults?) where Value == Date {
|
374 | 376 | self.init(lookup: CastableLookup(), key: key, store: store)
|
375 | 377 | }
|
376 |
| - |
| 378 | + |
377 | 379 | fileprivate init(_ key: String, store: UserDefaults?) where Value: Codable {
|
378 | 380 | self.init(lookup: CodableLookup(), key: key, store: store)
|
379 | 381 | }
|
|
0 commit comments