Added Availability Attributes
This commit is contained in:
parent
fbe154665f
commit
a368a02ee7
|
@ -6,8 +6,14 @@
|
|||
// Copyright © 2022 Yakov Manshin. See the LICENSE file for license info.
|
||||
//
|
||||
|
||||
#if swift(>=5.5)
|
||||
|
||||
@available(iOS 13, *)
|
||||
@available(macOS 10.15, *)
|
||||
public protocol AsyncFeatureFlagStoreProtocol {
|
||||
|
||||
func value<Value>(forKey key: String) async throws -> Value
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,6 +6,10 @@
|
|||
// Copyright © 2022 Yakov Manshin. See the LICENSE file for license info.
|
||||
//
|
||||
|
||||
#if swift(>=5.5)
|
||||
|
||||
@available(iOS 13, *)
|
||||
@available(macOS 10.15, *)
|
||||
public protocol AsyncMutableFeatureFlagStoreProtocol: AnyObject, AsyncFeatureFlagStoreProtocol {
|
||||
|
||||
func setValue<Value>(_ value: Value, forKey key: String) async throws
|
||||
|
@ -18,8 +22,12 @@ public protocol AsyncMutableFeatureFlagStoreProtocol: AnyObject, AsyncFeatureFla
|
|||
|
||||
// MARK: - Default Implementation
|
||||
|
||||
@available(iOS 13, *)
|
||||
@available(macOS 10.15, *)
|
||||
extension AsyncMutableFeatureFlagStoreProtocol {
|
||||
|
||||
public func saveChanges() async throws { }
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
// Copyright © 2022 Yakov Manshin. See the LICENSE file for license info.
|
||||
//
|
||||
|
||||
#if swift(>=5.5)
|
||||
|
||||
import YMFF
|
||||
#if !COCOAPODS
|
||||
import YMFFProtocols
|
||||
|
@ -72,3 +74,5 @@ fileprivate enum AsyncMutableFeatureFlagStoreMockError: Error {
|
|||
case valueNotFoundInStore
|
||||
case valueTypeMismatch
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
// Copyright © 2022 Yakov Manshin. See the LICENSE file for license info.
|
||||
//
|
||||
|
||||
#if swift(>=5.5)
|
||||
|
||||
@testable import YMFF
|
||||
|
||||
import XCTest
|
||||
|
@ -26,3 +28,5 @@ final class AsyncMutableStoreTests: XCTestCase {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue