Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
IanHoar committed Feb 29, 2024
1 parent 88a46fb commit bacddce
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@
}
}

extension Case where Value: BindableAction, Value.State: ObservableState {
public subscript<Member: Equatable & Sendable>(
dynamicMember keyPath: WritableKeyPath<Value.State, Member>
) -> Case<Member> {
Case<Member>(
embed: { self.embed(.binding(.set(keyPath, $0))) },
extract: { self.extract(from: $0)?.binding?.value.base as? Member }
)
}
}
// extension Case where Value: BindableAction, Value.State: ObservableState {
// public subscript<Member: Equatable & Sendable>(
// dynamicMember keyPath: WritableKeyPath<Value.State, Member>
// ) -> Case<Member> {
// Case<Member>(
// embed: { self.embed(.binding(.set(keyPath, $0))) },
// extract: { self.extract(from: $0)?.binding?.value.base as? Member }
// )
// }
// }
#endif

0 comments on commit bacddce

Please sign in to comment.