Skip to content

Comments

fix: replace banned TypeScript type {} with React.PropsWithChildren#3546

Merged
mattgperry merged 1 commit intomotiondivision:mainfrom
veeceey:fix/typescript-ban-types-issue
Feb 17, 2026
Merged

fix: replace banned TypeScript type {} with React.PropsWithChildren#3546
mattgperry merged 1 commit intomotiondivision:mainfrom
veeceey:fix/typescript-ban-types-issue

Conversation

@veeceey
Copy link
Contributor

@veeceey veeceey commented Feb 8, 2026

Fixes TypeScript lint error by replacing the banned type {} with React.PropsWithChildren.

Summary

TypeScript's @typescript-eslint/ban-types rule flags {} as a banned type. This PR replaces it with the more specific React.PropsWithChildren type.

Changes

  • Changed type from {} to React.PropsWithChildren
  • Maintains same functionality with better type safety

Test Plan

  • TypeScript compilation passes
  • No runtime changes
  • Lint errors resolved

…hChildren

Replace the deprecated {} type with React.PropsWithChildren for the List component props type. This resolves the @typescript-eslint/ban-types lint error.

The {} type is discouraged because it means "any non-nullish value" rather than "empty object". React.PropsWithChildren correctly expresses that the component accepts children.
@veeceey veeceey force-pushed the fix/typescript-ban-types-issue branch from 68ea580 to ae4c6c6 Compare February 16, 2026 21:14
@mattgperry
Copy link
Collaborator

Thanks for the PR!

@mattgperry mattgperry merged commit 1d566fc into motiondivision:main Feb 17, 2026
5 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