-
Notifications
You must be signed in to change notification settings - Fork 670
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
TypeScript update for 4.x #486
Conversation
…ator Addresses issue #20007 by adding a callable type signature for the memoize callback in createSelectorCreator. This avoids a type error when using Lodash Memoize as the first argument in createSelectorCreator
66fcf90
to
05fce95
Compare
Pull Request Test Coverage Report for Build 1349892919Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 548532703
💛 - Coveralls |
Codecov Report
@@ Coverage Diff @@
## master #486 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 21 21
=========================================
Hits 21 21 |
…ut type (provides cleaner defaults)
Side note: why are we getting three different code coverage report comments? :) |
Haha, good question! There is at least two because Codecov and Coveralls are both running in the workflow (lol, we never did decide on just one). I guess that Coveralls is having trouble distinguishing the main repo from the fork 🤷? Regardless, seems like a good reason to drop Coveralls and use Codecov instead. WDYT? I can make a separate PR to pick one of the two. It's just a few lines in the workflow file. |
fdded23
to
d3bbd08
Compare
I'm for whatever provides the most useful info and the least amount of annoyance :) As far as I know Reselect is the only one of the Redux org repos that has code coverage reports turned on in PRs, and given the very small size of the library, I'm not sure I find that all that useful. (Granted, I'm also not the person who spent most of their time maintaining this lib in the first place :) ) |
Code-wise, this seems reasonable so far. Looks like you've mostly swapped the type tests for |
Yup! And set the baseline TS version to 3.9 (mainly to make the testing easier)
I'll make a PR to remove Coveralls, and I guess if anyone gets angry I'll just blame it on you 😆 On a more serious note: we could leave the "removal" PR up for a while and see if someone really feels adamant about it. Give it a week or so and if no one says anything we could merge it right? It's super easy to add back in whenever. I'm also not convinced Coveralls was even running anytime recently: |
Side note: made #488 to track discussion on the coverage reporters. |
Hmm. Just bumped the TS test matrix to cover TS 4.2+ as well, and those immediately started failing:
|
0c92a19
to
2f62f50
Compare
I've updated the typedefs to use the types from eXamadeus#3 , which are way shorter and hopefully better as well. Since that requires TS 4.2+, I've dropped <4.2 from the test matrix. To keep those semi-supported, I've moved the existing typedefs into a nested folder and added a I tried doing a local |
- Extracted standalone `EqualityFn` type - Removed incorrect `index` param from equality args - Added specialized overload of `createSelectorCreator` specifically for usage with `defaultMemoize`, for better inference Ref: reduxjs#384 (comment)
Just published this current PR as https://github.com/reduxjs/reselect/releases/tag/v4.1.0-alpha.0 for folks to try out. |
Good enough. Merging this, and following up with a PR that actually converts the source to TS. |
Update TypeScript without causing breaking changes
Upgrade TypeScript to 3.9 and fix any broken issues that can be fixed without a major version update. Any PRs that can be included to fix the typings without a major version update will be pulled into this PR.
TODO:
Fixes
Add tests for
Includes PRs:
#465 (@micahbales): Use Callable Type Signature for Memoize Callback in
createSelectorCreator
Related