Is there a way to use rescripts with tsc? #46
Comments
Hi @m93a –– CRA transpiles TypeScript via Babel... so Rescripts might not be a good fit for you (as it is a tool for patching CRA). As for the error you're getting, I need to know more about how you're setting up your project: are you using the eslint rescript or the tslint rescript? Either way, I believe this error stems from you not having the right linting configuration. |
I'm sorry but I think I won't be able to elaborate on this further, because porting my application to a Babel-compatibile TypeScript would be too much of a struggle, so I'll just stick with the deprecated react-scripts-ts. We can leave this issue open for a bit if anyone cares and has the time to investigate it further. Or you can close it 🤷 Sorry to bother 🙂 |
@m93a no worries––I should clarify one thing though: you wouldn't have to go through "porting [your] application to a Babel-compatible TypeScript"... this is the pre-configured TypeScript transpilation in CRA projects. All you would need is the Kind regards, Harry |
Hi @harrysolovay ! Let's start from a fresh working CRA + electron + typescript project,
This is working well but i need to allow namespaces in Typescript. |
@Deveosys –– Namespaces are not available in the Babel TypeScript transform (which is what's being used in CRA). Check out this thread |
@harrysolovay, what about the |
@Deveosys oh nice––they must've added that after the initial release. In that case, can you just use it via your Babel config? What problems are you running into? |
@harrysolovay, thanks for your answers. The problem is that i'm not really confortable with webpack / babel and so rescripts config. So, from the setup i gave you, I'd have to add :
to my |
Yep. That should do the trick. |
I've came to this package because react-scripts-ts became deprecated and I want custom
eslint
config and don't want to compile TypeScript with Babel. I've followed the steps described in README (installed rescripts, created .rescriptsrc, added use-eslint-config), but the build failed withYes, I use
const
in my code. And I want to. How do I get the program to compile withtsc
again?The text was updated successfully, but these errors were encountered: