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

fix: correctly infer deferred types for top-level promises #7104

Merged
merged 5 commits into from
Aug 8, 2023

Conversation

pcattori
Copy link
Contributor

@pcattori pcattori commented Aug 8, 2023

Fixes #5427

@changeset-bot
Copy link

changeset-bot bot commented Aug 8, 2023

🦋 Changeset detected

Latest commit: 67e7729

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@remix-run/server-runtime Patch
@remix-run/cloudflare Patch
@remix-run/deno Patch
@remix-run/dev Patch
@remix-run/node Patch
@remix-run/react Patch
@remix-run/cloudflare-pages Patch
@remix-run/cloudflare-workers Patch
@remix-run/architect Patch
@remix-run/express Patch
@remix-run/netlify Patch
@remix-run/serve Patch
@remix-run/testing Patch
@remix-run/vercel Patch
create-remix Patch
remix Patch
@remix-run/css-bundle Patch
@remix-run/eslint-config Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pcattori pcattori requested a review from jacob-ebey August 8, 2023 16:23
@pcattori pcattori linked an issue Aug 8, 2023 that may be closed by this pull request
1 task
Comment on lines -8 to -31
isEqual<SerializeFrom<string>, string>(true);
isEqual<SerializeFrom<number>, number>(true);
isEqual<SerializeFrom<boolean>, boolean>(true);
isEqual<SerializeFrom<String>, String>(true);
isEqual<SerializeFrom<Number>, Number>(true);
isEqual<SerializeFrom<Boolean>, Boolean>(true);
isEqual<SerializeFrom<null>, null>(true);

isEqual<IsNever<SerializeFrom<undefined>>, true>(true);
isEqual<IsNever<SerializeFrom<Function>>, true>(true);
isEqual<IsNever<SerializeFrom<symbol>>, true>(true);

isEqual<SerializeFrom<[]>, []>(true);
isEqual<SerializeFrom<[string, number]>, [string, number]>(true);
isEqual<SerializeFrom<[number, number]>, [number, number]>(true);

isEqual<SerializeFrom<ReadonlyArray<string>>, string[]>(true);
isEqual<SerializeFrom<ReadonlyArray<Function>>, null[]>(true);

isEqual<SerializeFrom<{ hello: "remix" }>, { hello: "remix" }>(true);
isEqual<
SerializeFrom<{ data: { hello: "remix" } }>,
{ data: { hello: "remix" } }
>(true);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we're using type-fest's Jsonify now, these tests are no longer testing Remix code.

@pcattori pcattori force-pushed the pedro/fix-defer-types branch 2 times, most recently from d4d6128 to a134ba9 Compare August 8, 2023 16:28
@pcattori pcattori marked this pull request as draft August 8, 2023 16:50
@pcattori pcattori marked this pull request as ready for review August 8, 2023 17:51
@pcattori pcattori force-pushed the pedro/fix-defer-types branch from 46c5513 to 0ffe817 Compare August 8, 2023 17:51
@pcattori pcattori merged commit 6175fce into dev Aug 8, 2023
@pcattori pcattori deleted the pedro/fix-defer-types branch August 8, 2023 20:34
@github-actions github-actions bot added the awaiting release This issue has been fixed and will be released soon label 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 includes this pull request. 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 includes this pull request. 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
Labels
awaiting release This issue has been fixed and will be released soon CLA Signed feat:typescript package:server-runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DEFER - Optional return function type interface is incorrect
3 participants