Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why react-router/history.d.ts ? #11514

Closed
1 task done
ghost opened this issue Sep 26, 2016 · 4 comments
Closed
1 task done

Why react-router/history.d.ts ? #11514

ghost opened this issue Sep 26, 2016 · 4 comments

Comments

@ghost
Copy link

ghost commented Sep 26, 2016

We have history/history.d.ts. Why isn't react-router using this?

This file was added by #6073, but history/history.d.ts predates that PR. I don't see a reason why it was duplicated.

Can we get rid of react-router/history.d.ts? Unfortunately the two files seem to have diverged, so this won't be easy. But they reference the same project, and have the same authors listed.

@johnnyreilly
Copy link
Member

I'm not the author but this seems sensible. As an aside react-router will be undergoing big changes with regards history anyway; see here: remix-run/react-router#3611 (comment)

@remojansen
Copy link
Contributor

How can you install react-router/history via npm in TS 2.0? It used to be:

typings install react-router/history

but

npm install @types/react-router/history

is not a valid module name.

Thanks!

@ghost
Copy link
Author

ghost commented Oct 2, 2016

@remojansen You can't install the version of history that exists inside of react-router, hence this issue. Hopefully you can install @types/history and it will work.

@SteveByerly
Copy link

This version of history is missing the type for hash on the Location type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants