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

feat: loadable__server, use PropsWithChildren type alias for ChunkExtractorManager props #69470

Conversation

gbettencourt
Copy link
Contributor

The type definitions for React 18 removed children as a default prop, so components that accept children need to explicitly define children as a prop, or use the PropsWithChildren helper from @types/react to achieve the same result. Since ChunkExtractorManager is designed to wrap a react tree, it needs to accept children and it's prop type should reflect that. Note that this PR uses the PropsWithChildren helper which is backwards compatible with previous versions of React.

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: https://solverfox.dev/writing/no-implicit-children/
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the package.json.

@typescript-bot
Copy link
Contributor

typescript-bot commented Apr 30, 2024

@gbettencourt Thank you for submitting this PR! I see this is your first time submitting to DefinitelyTyped 👋 — I'm the local bot who will help you through the process of getting things through.

This is a live comment which I will keep updated.

1 package in this PR

Code Reviews

This PR can be merged once it's reviewed by a DT maintainer.

You can test the changes of this PR in the Playground.

Status

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • ✅ Only a DT maintainer can approve changes without tests

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 69470,
  "author": "gbettencourt",
  "headCommitOid": "7d2a45029a18eee6ea3b8702a52dc9db7e99e43a",
  "mergeBaseOid": "778ad7a80e9876f258270d84d1db4e6e1d5e3796",
  "lastPushDate": "2024-04-30T03:41:49.000Z",
  "lastActivityDate": "2024-05-02T17:22:34.000Z",
  "mergeOfferDate": "2024-05-02T17:21:34.000Z",
  "mergeRequestDate": "2024-05-02T17:22:34.000Z",
  "mergeRequestUser": "gbettencourt",
  "hasMergeConflict": false,
  "isFirstContribution": true,
  "tooManyFiles": false,
  "hugeChange": false,
  "popularityLevel": "Well-liked by everyone",
  "pkgInfo": [
    {
      "name": "loadable__server",
      "kind": "edit",
      "files": [
        {
          "path": "types/loadable__server/index.d.ts",
          "kind": "definition"
        }
      ],
      "owners": [
        "martynaskadisa",
        "luisherranz",
        "Armanio"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Well-liked by everyone"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "rbuckton",
      "date": "2024-05-02T17:20:55.000Z",
      "isMaintainer": true
    }
  ],
  "mainBotCommentID": 2084320645,
  "ciResult": "pass"
}

@typescript-bot typescript-bot added the Untested Change This PR does not touch tests label Apr 30, 2024
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Apr 30, 2024
@typescript-bot
Copy link
Contributor

Hey @gbettencourt,

😒 Your PR doesn't modify any tests, so it's hard to know what's being fixed, and your changes might regress in the future. Please consider adding tests to cover the change you're making. Including tests allows this PR to be merged by yourself and the owners of this module.

This can potentially save days of time for you!

@typescript-bot
Copy link
Contributor

🔔 @martynaskadisa @luisherranz @Armanio — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Maintainer Review in New Pull Request Status Board Apr 30, 2024
@typescript-bot typescript-bot added Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner labels May 2, 2024
@typescript-bot
Copy link
Contributor

@gbettencourt: Everything looks good here. I am ready to merge this PR (at 7d2a450) on your behalf whenever you think it's ready.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@martynaskadisa, @luisherranz, @Armanio: you can do this too.)

@typescript-bot typescript-bot moved this from Needs Maintainer Review to Waiting for Author to Merge in New Pull Request Status Board May 2, 2024
@gbettencourt
Copy link
Contributor Author

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board May 2, 2024
@typescript-bot typescript-bot merged commit 9ee16ae into DefinitelyTyped:master May 2, 2024
4 checks passed
@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintainer Approved Self Merge This PR can now be self-merged by the PR author or an owner Untested Change This PR does not touch tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants