Polymer / pwa-helpers

Small helper methods or mixins to help you build web apps.
BSD 3-Clause "New" or "Revised" License
439 stars 48 forks source link

`connect-mixin` won't handle TS types applied to redux store. #55

Closed vedtam closed 5 years ago

vedtam commented 5 years ago

Hi guys!

While setting up a new Lit-element + Typescript project, I noticed that connect-mixin won't handle types that I have applied to my redux store.

store is passed to connect() and it shows the correct types on hover (RootState):

screen shot 2018-12-17 at 18 29 43

but in the StateChanged(state) callback the type of state is any:

screen shot 2018-12-17 at 18 30 11

if I test the state using getState() inside the callback, I get the correct types once again:

screen shot 2018-12-17 at 18 41 01

Can someone give a suggestion on how to fix this?