From 357ebc9518df66158f2f2c616acac7a355c39a41 Mon Sep 17 00:00:00 2001 From: Benjamin Pisano Date: Tue, 28 Nov 2023 11:53:34 +0100 Subject: [PATCH] exported combine + improved documentation --- README.md | 4 +++- Sources/StateKit/Validator/Validator.swift | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) 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