Skip to content

Conversation

@marcbouchenoire
Copy link
Collaborator

This PR removes unnecessary return types and updates needed ones from ReactNode to JSX.Element, because TypeScript didn't support using ReactNode for return types on versions lower than 5.1.

Fixes #17.

@marcbouchenoire
Copy link
Collaborator Author

The current state of the PR prevents using primitive values like string or null, I'll revisit this later.

@marcbouchenoire
Copy link
Collaborator Author

I couldn't find a way to support TS <= 5.1 and primitive values like string or null on TS >= 5.1, so I'm setting 5.1 as the minimum TS version.

@marcbouchenoire marcbouchenoire changed the title Fix return types to support TS version lower than 5.1 Set TypeScript 5.1 as the minimum TS version Jul 15, 2025
@marcbouchenoire marcbouchenoire merged commit c43a918 into main Jul 15, 2025
5 checks passed
@marcbouchenoire marcbouchenoire deleted the support-TS-5.1 branch July 15, 2025 10:41
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.

Issues when using frimousse with TypeScript versions below 5.1

1 participant