Skip to content

Commit

Permalink
exported combine + improved documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bpisano committed Nov 28, 2023
1 parent 39531ff commit 357ebc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<Void, Never> = .init()

var isValid: Bool {
userManager.currentUser != nil
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/StateKit/Validator/Validator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//

import Foundation
import Combine
@_exported import Combine

public protocol Validator {
associatedtype _State: State
Expand Down

0 comments on commit 357ebc9

Please sign in to comment.