forked from pointfreeco/swift-composable-architecture
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename certain Effect APIs (pointfreeco#92)
* Rename certain Effect APIs * Move deprecations * Fix
- Loading branch information
1 parent
940207c
commit 0807f9a
Showing
6 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
Sources/ComposableArchitecture/Internal/Deprecations.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Combine | ||
|
||
// NB: Deprecated after 0.1.3: | ||
|
||
extension Effect { | ||
@available(*, deprecated, renamed: "run") | ||
public static func async( | ||
_ work: @escaping (Effect.Subscriber<Output, Failure>) -> Cancellable | ||
) -> Self { | ||
self.run(work) | ||
} | ||
} | ||
|
||
extension Effect where Failure == Swift.Error { | ||
@available(*, deprecated, renamed: "catching") | ||
public static func sync(_ work: @escaping () throws -> Output) -> Self { | ||
self.catching(work) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters