-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
typesafe-actions v2.0 doesn't work well with @babel/plugin-transform-typescript #36
Comments
I don't know what For me it's really a simple Then you can take JS stuff that tsc throw to out folder and from there it's just you know normal JS. Closing because it seems that it cannot be solved on my end. |
Okay @piotrwitek. Thanks for taking the time to reply. I sorted out my issue and thought I'd report back here in case other people have a similar issue – it turned out to not have anything to do with my use of In my IDE settings (I use IntelliJ) the TypeScript interpreter that was configured was too old (2.7.2). By upgrading that (or using the 2.8.1 IDE bundled version) I resolved all my issues using Also worth noting (for anyone searching around) that |
Hey @lnhrdt, glad to hear that you solved it with success! |
If I understand correctly,
typesafe-actions
v2.0 doesn't work well with@babel/plugin-transform-typescript
.I've been using
@babel/plugin-transform-typescript
in conjunction withreact-app-rewired
(viareact-app-rewire-typescript-babel-preset
so that I can usereact-scripts
fromcreate-react-app
rather thanreact-scripts-ts
fromcreate-react-app-typescript
. I do this because I want to use all the upstream features increate-react-app
that haven't made it tocreate-react-app-typescript
yet.I get a whole bunch of type errors in my IDE using
typesafe-actions@2.0.0-rc.1
that I don't get when I try out your sample app. For example:Creating actions like:
Produces:
I just asked a question in
react-app-rewire-typescript-babel-preset
to understand how this setup might differ from the one in your sample app. It seems the Babel TypeScript preset isn't using TypeScript at all and as a result there's a few language feature gotchas.Can you help me determine if it's possible to use
typesafe-actions
v2.0 with@babel/plugin-transform-typescript
rather than standard TypeScript compiler?The text was updated successfully, but these errors were encountered: