-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Description
I encountered an issue using frimousse with TypeScript versions below 5.1. Specifically when using components that return ReactNode as the return type.
In TypeScript versions before 5.1, you can't use ReactNode in one specific case - typing the return type of a component (as explained in this article)
This causes TypeScript errors like:
'FrimousseEmoji.Empty' cannot be used as a JSX component.
Its return type 'ReactNode' is not a valid JSX element.
Type 'undefined' is not assignable to type 'Element | null'.ts(2786)
After upgrading to TypeScript 5.1 or higher, the issue is resolved.
Would it be possible to:
- Mention the minimum required TypeScript version (>= 5.1) in the README or documentation?
- Add
typescriptas apeerDependencyfield inpackage.jsonto prevent issues for users on older versions?
Thanks for the great work on this library!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels