I'm trying out composable core location. This is the piece of code that throttles reporting of location to every 15 seconds. However I get loads of compilation errors:
case .locationManager(.didUpdateLocations(let locations)):
state.lastLocations = locations
return Effect(value: AppAction.reportLocation)
.throttle(
id: env.reportId,
for: 15,
scheduler: env.scheduler,
latest: true
)
env.scheduler is AnyScheduler<DispatchQueue>, env.reportId is simple hashable struct. This is how it looks like when I try to compile the code:
Judging from extra argument error I think it infers the throttle method on Publisher type rather than Effect directly. Any help is appreciated.
