I tried to download the React-Router typings definition using typings install --save --global dt~react-router
, but my code will still not compile because the HistoryModule referenced by typings/globals/react-router/index.d.ts does not exist.
Earlier I was recommended to go with typings --save react-router
, but although this includes the dreaded "HistoryModule", it is missing other key typing definitions for properties which the React Router elements typically have (missing onChange property of Route element props). Is there something else from typings that I need to download to get this to work? Also, how can I tell if I need to download multiple other global typings definitions to get a different one to work, because I'm not aware of any way and the typings command does not appear to understand if a global typing definition depends on other modules.
from https://github.com/DefinitelyTyped/DefinitelyTyped/issues/9928
The CLI tells you that there's been references stripped, it is up to the user to make sure they get installed. This is because references are not an adequate dependency system.
typings install dt~react-router/history --global
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With