diff --git a/README.md b/README.md index 85e1f37..444a413 100644 --- a/README.md +++ b/README.md @@ -44,9 +44,11 @@ enum AppState: State { **2. Create validators**: Validators determine state validity and specify the next state. They conform to the `Validator` protocol. ```swift -final class AuthenticationValidator { +final class AuthenticationValidator: Validator { let state: AppState = .authentication let nextState: AppState = .app + var shouldPerformValidation: PassthroughSubject = .init() + var isValid: Bool { userManager.currentUser != nil } diff --git a/Sources/StateKit/Validator/Validator.swift b/Sources/StateKit/Validator/Validator.swift index 377124d..ae96684 100644 --- a/Sources/StateKit/Validator/Validator.swift +++ b/Sources/StateKit/Validator/Validator.swift @@ -6,7 +6,7 @@ // import Foundation -import Combine +@_exported import Combine public protocol Validator { associatedtype _State: State