Closed abenhamdine closed 4 years ago
Interesting, it actually does seem to infer the correct function signature for me:
ah weird FWIW I use ts 3.8.3
Yeah I'm using the same version.
Should be available at react-media@next
or react-media@2.0.0-rc.1
btw
see https://github.com/ReactTraining/react-media/issues/150
works fine for me :
remark : with single query, we have to use the generic to type the result :
if not, result is typed unknown, TS seems unable to pick the first signature