Skip to content

Commit 46961b0

Browse files
committed
Make StateAccessor init public
1 parent 38e6320 commit 46961b0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

WorkflowSwiftUI/Sources/StateAccessor.swift

+8
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
public struct StateAccessor<State: ObservableState> {
1313
let state: State
1414
let sendValue: (@escaping (inout State) -> Void) -> Void
15+
16+
public init(
17+
state: State,
18+
sendValue: @escaping (@escaping (inout State) -> Void) -> Void
19+
) {
20+
self.state = state
21+
self.sendValue = sendValue
22+
}
1523
}
1624

1725
extension StateAccessor: ObservableModel {

WorkflowSwiftUI/Tests/ObservableScreenTests.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
import SwiftUI
44
import ViewEnvironment
55
@_spi(ViewEnvironmentWiring) import ViewEnvironmentUI
6+
import WorkflowSwiftUI
67
import XCTest
7-
@testable import WorkflowSwiftUI
88

99
final class ObservableScreenTests: XCTestCase {
1010
func test_viewEnvironmentObservation() {

0 commit comments

Comments
 (0)