-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Tuple type serialisation #6566
Comments
@mattcorner could you help me understand why |
Here's the solution in a Typescript playground. Will land this in a PR when I get the chance. |
Fixed by #6616 |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
What version of Remix are you using?
1.16.1
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
We often have typings that narrow down, so a top level type might define a property as
string[]
but a refined version of that type might narrow it down to["Some value"]
. This works fine, until Remix infers and serialises the type across the network boundary.I've taken the Serialization code from the repository, and generated a Typescript playground showing the issue. You'll see that the tuple gets interpretted as an array and has all of its keys incorrectly defined.
Typescript playground
Expected Behavior
The serialised type to remain
string[] & ["Some value"]
Actual Behavior
The seralised type becomes
The text was updated successfully, but these errors were encountered: