Skip to content

Commit 9a2408b

Browse files
committed
Adding iOS 15/macOS 12+ annotations for onStoreDidLoad functions
1 parent e838f5c commit 9a2408b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Sources/Boutique/Store+Observation.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import SwiftUI
22

33
public extension View {
4+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
45
func onStoreDidLoad<StorableItem: Codable & Sendable>(_ store: Store<StorableItem>, onLoad: @escaping () -> Void, onError: ((Error) -> Void)? = nil) -> some View {
56
self.task({
67
do {
@@ -12,6 +13,7 @@ public extension View {
1213
})
1314
}
1415

16+
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
1517
func onStoreDidLoad<StorableItem: Codable & Sendable>(_ store: Store<StorableItem>, update hasLoadedState: Binding<Bool>, onError: ((Error) -> Void)? = nil) -> some View {
1618
self.task({
1719
do {

0 commit comments

Comments
 (0)