-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c0bdf61
commit cd5419e
Showing
5 changed files
with
54 additions
and
15 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
1 change: 1 addition & 0 deletions
1
0292-cross-platform-pt3/Counter/Sources/Counter/CounterModel.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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import Dependencies | ||
import FactClient | ||
import Foundation | ||
import Perception | ||
import SwiftNavigation | ||
|
11 changes: 11 additions & 0 deletions
11
0292-cross-platform-pt3/Counter/Sources/FactClient/FactClient.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,11 @@ | ||
import Dependencies | ||
import DependenciesMacros | ||
|
||
@DependencyClient | ||
public struct FactClient: Sendable { | ||
public var fetch: @Sendable (Int) async throws -> String | ||
} | ||
|
||
extension FactClient: TestDependencyKey { | ||
public static let testValue = FactClient() | ||
} |
14 changes: 3 additions & 11 deletions
14
.../Counter/Sources/Counter/FactClient.swift → ...urces/FactClientLive/FactClientLive.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
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