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(types): PropsWithChildren type argument issue #5223

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

mertJF
Copy link
Contributor

@mertJF mertJF commented Nov 13, 2024

Problem
The current CalendarProps type definition is incorrect, leading to type errors when using the component. This issue arises because React.PropsWithChildren is a generic type that requires a type argument to specify the component's props.

Changes
This PR fixes the type definition by correctly combining React.PropsWithChildren with CalendarProps. This ensures proper type checking and prevents potential runtime errors.

Screenshots

error

Contribution checklist

  • I have followed the contributing guidelines.
  • I have added sufficient test coverage for my changes.
  • I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

✅ This pull request was sent to the PullRequest network for review. Expert reviewers are now being matched to your request based on the code's requirements. Stay tuned!

What to expect from this code review:
  • Comments posted to any areas of potential concern or improvement.
  • Detailed feedback or actions needed to resolve issues that are found.
  • Turnaround times vary, but we aim to be swift.

@mertJF you can click here to see the review status or cancel the code review job.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

PullRequest Breakdown

Reviewable lines of change

+ 100
- 99

100% TSX

Type of change

Fix - These changes are likely to be fixing a bug or issue.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

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

Nice catch. This change looks good to me.

Image of Jacob Jacob


Reviewed with ❤️ by PullRequest

@martijnrusschen
Copy link
Member

looks like the linter is failing, can you review and fix?

Copy link

codecov bot commented Nov 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.89%. Comparing base (8b3f157) to head (066da4f).
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5223   +/-   ##
=======================================
  Coverage   96.89%   96.89%           
=======================================
  Files          29       29           
  Lines        3381     3381           
  Branches     1401     1414   +13     
=======================================
  Hits         3276     3276           
  Misses        105      105           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@martijnrusschen martijnrusschen merged commit 393f5c6 into Hacker0x01:main Nov 14, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants