Closed arcas0803 closed 6 years ago
Hey there -- Could you please provide a bit more code? It's a bit tough to know where the type error is coming in...
What is the signature of the Middleware function? If it returns a List<Middleware<AppState>>
, then you might need to provide full type info to the EpicMiddleware
constructor. In addition, addAll
will return a void, rather than the list. This means your first two version are returning void
to the middleware
property. So you probably need to use either:
..addAll
+ type info:
middleware: middleware()..addAll([EpicMiddleware<AppState>(allEpics)])
or using the +
operator with type info:
middleware: middleware() + [EpicMiddleware<AppState>(allEpics)]
Let me know if that works!
..addAll solve the problem. Thanks. Closing "issue"
I get an error using both types. I don't know if is an error or maybe a don't know how to handle: In the store initialization
middleware: middleware().addAll([new EpicMiddleware(allEpics)])
ormiddleware: middleware().addAll(new EpicMiddleware(allEpics))
or middleware: [middleware(),new EpicMiddleware(allEpics)] I don't know how to combine both.