Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

typescript definition for react-router v2.0 - error `has no exported member 'browserHistory'`

I am using react-router v.2.0.0.-rc3 and typescript. I installed the definition file via tsd. Since they changed the browserHistory from beeing a mixin to a module, I get the error Module '"react-router"' has no exported member 'browserHistory' on my terminal when compiling the javascript via webpack. Is there an easy way I can modify the react-router.d.ts file to fix the error? Or do I just have to wait until they update the definition file? My app is working fine, it is just the console-error that bugs me.

like image 565
Felix Hagspiel Avatar asked Nov 08 '22 22:11

Felix Hagspiel


1 Answers

Awesome James Brantly pointed out that there is already an pullrequrest for v2.x. I used and all the errors are gone!

like image 186
Felix Hagspiel Avatar answered Nov 14 '22 23:11

Felix Hagspiel