react-router
react-router copied to clipboard
Narrow types for `hash`, `pathname` and `search`
Fixes https://github.com/remix-run/react-router/issues/11254
In order to be able to run yarn build, I had to add some type casts. Not sure if this is the right tradeoff. My first approach was to update interface Path (which Location extends from), but this caused many type errors which eventually lead to having to typecast window.location etc. anyway. My second and current approach was to cast types at the outermost perimeter only.
The type casts are committed separately.
🦋 Changeset detected
Latest commit: 28a079dd928274f3571dca4ddfe11937ad2fa47a
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 4 packages
| Name | Type |
|---|---|
| react-router | Patch |
| react-router-dom | Patch |
| react-router-dom-v5-compat | Patch |
| react-router-native | Patch |
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Hi @lensbart,
Welcome, and thank you for contributing to React Router!
Before we consider your pull request, we ask that you sign our Contributor License Agreement (CLA). We require this only once.
You may review the CLA and sign it by adding your name to contributors.yml.
Once the CLA is signed, the CLA Signed label will be added to the pull request.
If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at [email protected].
Thanks!
- The Remix team
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳
The only other thing this needs is some tests to ensure we don't break this in the future and it continues to function as expected through future versions of TS.
@timdorr consider it done!
@brophdawg11 is this something you would still be interested in merging? Then I’ll resolve the conflicts. Thanks!