-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Narrow types for hash
, pathname
and search
#11282
base: dev
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 28a079d The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
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 If you have already signed the CLA and received this response in error, or if you have any questions, please contact us at hello@remix.run. Thanks! - The Remix team |
Thank you for signing the Contributor License Agreement. Let's get this merged! 🥳 |
22d7975
to
409ce32
Compare
409ce32
to
fe0c00d
Compare
fd00d91
to
366d089
Compare
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! |
ffab5c0
to
c463168
Compare
1ac8863
to
28a079d
Compare
@brophdawg11 is this something you would still be interested in merging? Then I’ll resolve the conflicts. Thanks! |
Fixes #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 updateinterface Path
(whichLocation
extends from), but this caused many type errors which eventually lead to having to typecastwindow.location
etc. anyway. My second and current approach was to cast types at the outermost perimeter only.The type casts are committed separately.