-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
bug: Serialize<Record<string, any>> gets inferred as {} #4985
Labels
🐛 bug
Something isn't working
Comments
jussisaurio
added a commit
that referenced
this issue
Oct 31, 2023
3 tasks
jussisaurio
added a commit
that referenced
this issue
Oct 31, 2023
jussisaurio
added a commit
that referenced
this issue
Oct 31, 2023
jussisaurio
added a commit
that referenced
this issue
Nov 1, 2023
jussisaurio
added a commit
that referenced
this issue
Nov 1, 2023
jussisaurio
added a commit
that referenced
this issue
Nov 1, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Provide environment information
trpc commit
43e0da13073c8e5426c4c4fb6c3fb09e598fc6fe
Describe the bug
e.g. when using
z.record(z.any())
as output validator, the inferred type on the client is{}
.Actual:
Expected:
Link to reproduction
https://youtube.com
To reproduce
Paste the bug description into
packages/server/src/shared/internal/serialize.ts
Additional information
Serialize<Record<symbol, string>>
also gets inferred as{ [x: symbol]: string }
which is incorrect. Perhaps that would be a separate issue to file, but I think multiple of these bugs related toSerialize<Record<...>>
can probably be fixed in one go.👨👧👦 Contributing
Funding
The text was updated successfully, but these errors were encountered: