Skip to content

Conversation

@elliottkember
Copy link

Addresses #737

@elliottkember
Copy link
Author

elliottkember commented Jan 16, 2025

The test:typescript tests were failing this PR, because of the way Readonly<Result> works. If the return type is null or any other type – readonly won't work and throws an error.

My solution here was to copy the Immutable definition from immer and use Immutable<Result> – which solves all the type errors. I don't know whether this is a desired approach (from a license or dependency standpoint) but it made the tests pass which is a good start.

@elliottkember elliottkember changed the title Selectors return shared mutable values Immutable selector return types Feb 22, 2025
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

Successfully merging this pull request may close these issues.

1 participant