Skip to content

Commit

Permalink
fixing dummy observable
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazar Otasevic committed Sep 16, 2024
1 parent 4afb870 commit a7a6523
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
5 changes: 0 additions & 5 deletions Sources/ViewInspection/DummyObjects.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@ import SwiftUI
final class NSDummyDelegate: NSObject, NSApplicationDelegate {}
#endif

final class DummyOnservableOnject: ObservableObject {}

@available(iOS 17.0, macOS 14.0, tvOS 17.0, watchOS 10.0, *)
@Observable final class DummyOnservable {}

enum DummyEnum {
case case0
case case1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ typealias _Binding = SameBaseElement<Binding<Never>>

typealias _Environment = SameBaseElement<Environment<Never>>

typealias _EnvironmentObject = SameBaseElement<EnvironmentObject<DummyOnservableOnject>>
typealias _EnvironmentObject = SameBaseElement<EnvironmentObject<_PreviewHost>>

typealias _FetchRequest = SameBaseElement<FetchRequest<NSDictionary>>

typealias _FocusedBinding = SameBaseElement<FocusedBinding<Never>>

@available(iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0, *)
typealias _FocusedObject = SameBaseElement<FocusedObject<DummyOnservableOnject>>
typealias _FocusedObject = SameBaseElement<FocusedObject<_PreviewHost>>

typealias _FocusedValue = SameBaseElement<FocusedValue<Never>>

Expand All @@ -34,7 +34,7 @@ typealias _Namespace = SameBaseElement<Namespace>
typealias _NSApplicationDelegateAdaptor = SameBaseElement<NSApplicationDelegateAdaptor<NSDummyDelegate>>
#endif

typealias _ObservedObject = SameBaseElement<ObservedObject<DummyOnservableOnject>>
typealias _ObservedObject = SameBaseElement<ObservedObject<_PreviewHost>>

typealias _ScaledMetric = SameBaseElement<ScaledMetric<Double>>

Expand All @@ -44,7 +44,7 @@ typealias _SectionedFetchRequest = SameBaseElement<SectionedFetchRequest<Int,NSD

typealias _State = SameBaseElement<State<Never>>

typealias _StateObject = SameBaseElement<StateObject<DummyOnservableOnject>>
typealias _StateObject = SameBaseElement<StateObject<_PreviewHost>>

#if os(iOS) || os(tvOS)
@available(macOS, unavailable)
Expand Down
4 changes: 2 additions & 2 deletions Tools/apple_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ def get_names(entity):
'UIApplicationDelegate': 'UIDummyDelegate',
'NSObject': 'NSObject',
'BinaryFloatingPoint': 'Double',
'Onservable': 'DummyOnservable',
'ObservableObject': 'DummyOnservableOnject',
'Onservable': '_PreviewHost',
'ObservableObject': '_PreviewHost',
'NSFetchRequestResult': 'NSDictionary',
'View' : 'Never',
'Shape': 'Circle',
Expand Down

0 comments on commit a7a6523

Please sign in to comment.