import ComposableArchitecture
The Composable Architecture (TCA, for short) is a library for building applications in a consistent and understandable way, with composition, testing, and ergonomics in mind. It can be used in SwiftUI, UIKit, and more, and on any Apple platform (iOS, macOS, tvOS, and watchOS).
@MainActor func skipInFlightEffects(strict: Bool = true, fileID: StaticString = #fileID, file filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) async
Cancels any currently in-flight effects.
@MainActor func assert(_ updateStateToExpectedResult: @escaping (_ state: inout State) throws -> Void, fileID: StaticString = #fileID, file filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column)
Assert against the current state of the store.
@MainActor func receive<Value>(_ actionCase: CaseKeyPath<Action, Value>, _ value: Value, timeout nanoseconds: UInt64? = nil, assert updateStateToExpectedResult: ((_ state: inout State) throws -> Void)? = nil, fileID: StaticString = #fileID, file filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) async where Action : CasePathable, Value : Equatable
Asserts an action was received matching a case path with a specific payload, and asserts how the state changes.
@MainActor func receive<Value>(_ actionCase: _SendableCaseKeyPath<Action, Value>, _ value: Value, timeout duration: Duration, assert updateStateToExpectedResult: ((_ state: inout State) throws -> Void)? = nil, fileID: StaticString = #fileID, file filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) async where Action : CasePathable, Value : Equatable, Value : Sendable
Asserts an action was received matching a case path with a specific payload, and asserts how the state changes.
@MainActor func receive<Value>(_ actionCase: AnyCasePath<Action, Value>, timeout nanoseconds: UInt64? = nil, assert updateStateToExpectedResult: ((_ state: inout State) throws -> Void)? = nil, fileID: StaticString = #fileID, file filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) async
@MainActor func receive<Value>(_ actionCase: AnyCasePath<Action, Value>, timeout duration: Duration, assert updateStateToExpectedResult: ((_ state: inout State) throws -> Void)? = nil, fileID: StaticString = #fileID, file filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) async
@MainActor func receive(_ isMatching: (_ action: Action) -> Bool, timeout nanoseconds: UInt64? = nil, assert updateStateToExpectedResult: ((_ state: inout State) throws -> Void)? = nil, fileID: StaticString = #fileID, file filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) async
Asserts an action was received from an effect that matches a predicate, and asserts how the state changes.
@MainActor func receive(_ isMatching: (_ action: Action) -> Bool, timeout duration: Duration, assert updateStateToExpectedResult: ((_ state: inout State) throws -> Void)? = nil, fileID: StaticString = #fileID, file filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) async
Asserts an action was received from an effect that matches a predicate, and asserts how the state changes.
@MainActor func receive<Value>(_ actionCase: CaseKeyPath<Action, Value>, timeout nanoseconds: UInt64? = nil, assert updateStateToExpectedResult: ((_ state: inout State) throws -> Void)? = nil, fileID: StaticString = #fileID, file filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) async
Asserts an action was received matching a case path and asserts how the state changes.
@MainActor func receive<Value>(_ actionCase: CaseKeyPath<Action, Value>, timeout duration: Duration, assert updateStateToExpectedResult: ((_ state: inout State) throws -> Void)? = nil, fileID: StaticString = #fileID, file filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) async
Asserts an action was received matching a case path and asserts how the state changes.
@discardableResult @MainActor func send<Value>(_ action: CaseKeyPath<Action, Value>, _ value: Value, assert updateStateToExpectedResult: ((_ state: inout State) throws -> Void)? = nil, fileID: StaticString = #fileID, file filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) async -> TestStoreTask
Sends an action to the store and asserts when state changes.
@discardableResult @MainActor func send(_ action: Action, assert updateStateToExpectedResult: ((_ state: inout State) throws -> Void)? = nil, fileID: StaticString = #fileID, file filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) async -> TestStoreTask
Sends an action to the store and asserts when state changes.
@discardableResult @MainActor func send(_ action: CaseKeyPath<Action, Void>, assert updateStateToExpectedResult: ((_ state: inout State) throws -> Void)? = nil, fileID: StaticString = #fileID, file filePath: StaticString = #filePath, line: UInt = #line, column: UInt = #column) async -> TestStoreTask
Sends an action to the store and asserts when state changes.