-
Notifications
You must be signed in to change notification settings - Fork 61
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
Transform error with mode=wrap for TypeScript class component static propTypes type definition #197
Comments
For me, that doesn't work completely with |
The better solution I found: MyComponent['propTypes'] = { ... }; |
@kryops I just randomly found this, but shouldn't it be |
@rpearce that would be the workaround. The above code is however valid TypeScript, first only declaring the member and its type, then assigning its value later. When migrating our codebase to TypeScript, this was the minimal change required to make TypeScript happy about the prop types. |
Code (TypeScript):
Config:
throws the error
The text was updated successfully, but these errors were encountered: