-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Prevent stripping of return type #556
Comments
Hey @haswalt 👋, |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hello @haswalt, It is actually a babel-template bug. As a workaround I made a PR #619, that gives you a way to do it. |
I've been working on a component library that builds icon components from svgs. Building the components themselves are realy simple thanks for SVGR, but i'm having some issues with typescript support.
I'm using a custom template to add my own imports and adjustments to the output:
Mostly this works fine, except the return type us being stripped from the output code:
React.FC<Props>
and I can't get it to keep it in place. This is required to make typechecking work as the props aren't correctly typed otherwise.The text was updated successfully, but these errors were encountered: