-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
DEFER - Optional return function type interface is incorrect #5427
Comments
This issue has been automatically marked stale because we haven't received a response from the original author in a while 🙈. This automation helps keep the issue tracker clean from issues that are not actionable. Please reach out if you have more information for us or you think this issue shouldn't be closed! 🙂 If you don't do so within 7 days, this issue will be automatically closed. |
Bumping this I guess |
Fixed by #7104 |
🤖 Hello there, We just published version Thanks! |
🤖 Hello there, We just published version Thanks! |
What version of Remix are you using?
1.12.0
Are all your remix dependencies & dev-dependencies using the same version?
Steps to Reproduce
View the codesandbox:
https://codesandbox.io/p/sandbox/optimistic-http-sp5602?
The same function is returned twice in the loader, one being optional and the other required.
Expected Behavior
The type for both should be the same except for an undefined on the optional function:
Required -
Promise<SerializeObject<UndefinedToOptional<Example>>>
Optional -
Promise<SerializeObject<UndefinedToOptional<Example>>> | undefined
Actual Behavior
The optional property is lost, and the Promise is embedded inside the Type
Required -
Promise<SerializeObject<UndefinedToOptional<Example>>>
Optional -
SerializeObject<UndefinedToOptional<Promise<Example>>>
The text was updated successfully, but these errors were encountered: