September 2022
Intermediate to advanced
410 pages
10h 7m
English
At this point, we have a fully functional Rails 7 setup to start writing front-end code. We could stop here. However, instead, we’re going to add TypeScript to our mix.
There’s good news and bad news regarding using TypeScript with esbuild.
The good news is that esbuild will convert .ts files from TypeScript to JavaScript without any configuration changes on our part. The bad news is that all esbuild does is remove TypeScript type annotations and whatever other TypeScript-only stuff might exist in the file. Specifically, esbuild does not run the TypeScript compiler to determine if the code is type-safe. Because we want to use TypeScript specifically to determine if our code is type-safe, this seems less than ideal.
What we ...