Skip to content
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

Allow preloaded state types to contain nested unknown fields #4201

Closed
wants to merge 1 commit into from

Conversation

markerikson
Copy link
Contributor

This PR:

  • Updates the PreloadedState type to allow terminating on an unknown field in addition to other primitives

Without this, a state type that contains a nested unknown field
will cause errors like:

Types of property 'x' are incompatible.
Type 'unknown' is not assignable to type 'undefined'.ts(2345)

Without this, a state type that contains a nested `unknown` field
will cause errors like:

> Types of property 'x' are incompatible.
> Type 'unknown' is not assignable to type 'undefined'.ts(2345)
@github-actions
Copy link

Size Change: 0 B

Total Size: 27.1 kB

ℹ️ View Unchanged
Filename Size Change
./dist/redux.js 8 kB 0 B
./dist/redux.min.js 1.66 kB 0 B
./es/redux.js 7.88 kB 0 B
./es/redux.mjs 1.57 kB 0 B
./lib/redux.js 8.04 kB 0 B

compressed-size-action

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 21f4103:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration

@markerikson
Copy link
Contributor Author

Should we add never to this list also?

@markerikson
Copy link
Contributor Author

Turns out this is a duplicate of #4078 - closing in favor of that one.

@markerikson markerikson mentioned this pull request Oct 28, 2021
6 tasks
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