Improve TS exports and types#20
Merged
captbaritone merged 5 commits intoJan 15, 2026
Merged
Conversation
- Exported ISource - Added `ReactStore` interface - Made `Store` fields not private to fix TS4094 error
This was referenced Dec 22, 2025
| } else { | ||
| return x !== x && y !== y; | ||
| } | ||
| } |
Collaborator
There was a problem hiding this comment.
Should we just use Object.is? I think that's what React claims to use. If this is expected to provide that same behavior maybe we need to add a comment explaining why this particular behavior?
Collaborator
There was a problem hiding this comment.
Lets revisit this as a followup. I think the rest of the pr is fine so I'm going to merge.
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR:
react-concurrent-store@0.01build in React-ReduxReactStoreinterfaceStorefields not private to fix TS4094 errorStore<S, any>types inStoreManager.tsand ignores the lint warning for use ofanyneverin a couple places inuseStoreSelector, which seems to help with the follow-up PR to pass throughprevResult===comparisons inuseStoreSelectorwith the commonis()util to properly handleNaNvaluesBackground
When I tried to use the 0.0.1 build in React-Redux, I got these errors when I built React-Redux:
Seems TS doesn't like an "anonymous class type" that also has
privatefields.I initially tried marking them as
publicin a local build, and that resolved the errors for me.Here, I've both defined a
ReactStoreinterface thatStoreimplements, and also removedprivate(which I guess is about the same as marking them aspublic?)I also cleaned up some of the type usage as I worked through the later PR changes, and combined those here.
Unrelated to the type changes, I saw that some of my later tests happened to use
NaNas a selected value, and that led to infinite render loops. Replacing the===comparison withis()fixed that.