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

Allow generic to be left out in PropsWithChildren type #531

Merged
merged 1 commit into from
Jul 3, 2021

Conversation

jakst
Copy link
Contributor

@jakst jakst commented Jul 2, 2021

Many components take only children as a prop, and nothing else. Defaulting the generic helper type PropsWithChildren to {} allows the consumer to use it as simply props: PropsWithChildren instead of the awkward-looking props: PropsWithChildren<{}>.

Many components take only `children` as a prop, and nothing else. Defaulting the generic helper type `PropsWithChildren` to `{}` allows the consumer to use it as simply `props: PropsWithChildren` instead of the awkward-looking `props: PropsWithChildren<{}>`.
@ryansolid
Copy link
Member

Sound good.

@ryansolid ryansolid merged commit 0d83a19 into solidjs:main Jul 3, 2021
@coveralls
Copy link

Pull Request Test Coverage Report for Build 995147843

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 90.196%

Totals Coverage Status
Change from base Build 992416643: 0.0%
Covered Lines: 1055
Relevant Lines: 1119

💛 - Coveralls

@jakst jakst deleted the patch-1 branch July 3, 2021 15:15
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.

3 participants