-
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
return type of useLoaderData is missing properties. #7462
Comments
This looks like a bug in |
Duplicate of #7246 |
Hi @MichaelDeBoey, Thank you for taking the time to review this. While I see the similarity in the overarching theme of type issues, I was wondering if we are sure that this is a duplicate of #7246. Issue #7246 appears to concern types disappearing when set to |
@MoSattler I did some further investigation on this some time ago and posted in the |
@MoSattler we are also having the same issue. Anytime we have an object with a single key called Seems like they've got an issue for it in type-fest: sindresorhus/type-fest#657 |
@MoSattler I went down WAY TOO many rabbit holes and have a temp solution until that issue gets fixed... The issue is any object that has a We have a |
Thank you for the clarification @MichaelDeBoey |
@kevinbailey25 Oh wow! Quite the tricky bug. Really nice find though. Thanks for sharing! |
This is one of the main reasons I created |
What version of Remix are you using?
2.0.0
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
Expected Behavior
When returning an object from the loader in the shape of
{ name: string}
, typescript passes. Both fields (willBeForgotten
andwillBeRemembered
) are being returned fromuseLoaderData
.Actual Behavior
willBeForgotten
is not returned fromuseLoaderData
The text was updated successfully, but these errors were encountered: