-
Notifications
You must be signed in to change notification settings - Fork 132
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
Forced allowSyntheticDefaultImports in tsconfig #110
Comments
Interesting. So you're saying that the Would this be fixed by using |
I also thought downstream projects wouldn't be affected. I cannot say for sure whether this is solely tsc or a combination of tsc and possibly react types. I'll try find another lib also with Here's a CodeSandbox. I originally thought it might have been my tsc version, 3.5, but from #942 it seems like CodeSandbox is fixed to 3.3.3 and sees the same type error. |
|
A PR would be great! Thanks for looking into this. |
- synthetic default exports to es6 exports
- synthetic default imports to es6 imports
I was able to reproduce the issue in this repo: https://github.com/kevinsqi/react-circular-progressbar-issue-110 For posterity, this is the exact tsc error I got when allowSyntheticDefaultImports=false:
|
Import react with "* as React" to prevent the need to use allowSyntheticDefaultExports/esModuleInterop in consumers (issue #110)
@ethanae merged your PR and released it in v2.0.2. I've tested it out and it appears to work - please let me know if you still encounter any issues. Thank you for raising the issue and submitting a fix! |
I was not sure where to continue and I added my findings to #112 hope it works as well :) |
@Rodrico does v2.0.3 work for you now? If so, I can close this issue out :) |
@Rodrico I haven't heard back in a while so I'm going to close this issue. But if the issue you had persists in v2.0.3, please let me know! |
I just added this to my project. Very neat. However, is it necessary to force client
tsconfig
s to enableallowSyntheticDefaultImports
? Looking at thereact-circular-progressbar
types there are only two imports toReact
using synthetic default imports.The text was updated successfully, but these errors were encountered: