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

DEFER - Optional return function type interface is incorrect #5427

Closed
1 task done
TheRealFlyingCoder opened this issue Feb 11, 2023 · 5 comments · Fixed by #7104
Closed
1 task done

DEFER - Optional return function type interface is incorrect #5427

TheRealFlyingCoder opened this issue Feb 11, 2023 · 5 comments · Fixed by #7104

Comments

@TheRealFlyingCoder
Copy link
Contributor

What version of Remix are you using?

1.12.0

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

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>>>

@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot added the needs-response We need a response from the original author about this issue/PR label Apr 17, 2023
@TheRealFlyingCoder
Copy link
Contributor Author

Bumping this I guess

@github-actions github-actions bot removed the needs-response We need a response from the original author about this issue/PR label Apr 20, 2023
@jacob-ebey jacob-ebey assigned pcattori and unassigned jacob-ebey Aug 7, 2023
@pcattori pcattori linked a pull request Aug 8, 2023 that will close this issue
@pcattori
Copy link
Contributor

pcattori commented Aug 8, 2023

Fixed by #7104

@pcattori pcattori closed this as completed Aug 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

🤖 Hello there,

We just published version v0.0.0-nightly-a179aa7-20230809 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

@github-actions
Copy link
Contributor

🤖 Hello there,

We just published version v0.0.0-nightly-b1149bb-20230810 which involves this issue. If you'd like to take it for a test run please try it out and let us know what you think!

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

4 participants