@@ -49,8 +49,6 @@ public struct ObservableStateMacro {
4949 static let ignoredMacroName = " ObservationStateIgnored "
5050 static let presentsMacroName = " Presents "
5151 static let presentationStatePropertyWrapperName = " PresentationState "
52- static let sharedPropertyWrapperName = " Shared "
53- static let sharedReaderPropertyWrapperName = " SharedReader "
5452
5553 static let registrarVariableName = " _$observationRegistrar "
5654
@@ -450,8 +448,7 @@ extension ObservableStateMacro: MemberAttributeMacro {
450448 )
451449
452450 if property. hasMacroApplication ( ObservableStateMacro . presentsMacroName)
453- || property. hasMacroApplication ( ObservableStateMacro . sharedPropertyWrapperName)
454- || property. hasMacroApplication ( ObservableStateMacro . sharedReaderPropertyWrapperName)
451+ || knownSupportedPropertyWrappers. contains ( where: property. hasMacroApplication)
455452 {
456453 return [
457454 AttributeSyntax (
@@ -543,7 +540,7 @@ public struct ObservationStateTrackedMacro: AccessorMacro {
543540 if property. hasMacroApplication ( ObservableStateMacro . ignoredMacroName)
544541 || property. hasMacroApplication ( ObservableStateMacro . presentationStatePropertyWrapperName)
545542 || property. hasMacroApplication ( ObservableStateMacro . presentsMacroName)
546- || property . hasMacroApplication ( ObservableStateMacro . sharedPropertyWrapperName )
543+ || knownSupportedPropertyWrappers . contains ( where : property . hasMacroApplication )
547544 {
548545 return [ ]
549546 }
@@ -602,7 +599,7 @@ extension ObservationStateTrackedMacro: PeerMacro {
602599 if property. hasMacroApplication ( ObservableStateMacro . ignoredMacroName)
603600 || property. hasMacroApplication ( ObservableStateMacro . presentationStatePropertyWrapperName)
604601 || property. hasMacroApplication ( ObservableStateMacro . presentsMacroName)
605- || property . hasMacroApplication ( ObservableStateMacro . sharedPropertyWrapperName )
602+ || knownSupportedPropertyWrappers . contains ( where : property . hasMacroApplication )
606603 || property. hasMacroApplication ( ObservableStateMacro . trackedMacroName)
607604 {
608605 return [ ]
@@ -626,3 +623,7 @@ public struct ObservationStateIgnoredMacro: AccessorMacro {
626623 return [ ]
627624 }
628625}
626+
627+ private let knownSupportedPropertyWrappers = [
628+ " Shared " , " SharedReader " , " Fetch " , " FetchAll " , " FetchOne "
629+ ]
0 commit comments