Liza Shulyayeva

TypeScript <3

I’ve started playing around with TypeScript for the first time over the last couple of weeks and it is excellent. I’ve made a few hobby JS games in the past as you can see from the games page. JavaScript was always fun for me, but after years of statically typed languages I have grown to prefer them.

Of course, there are always exceptions. A looser language probably would’ve been a better choice for my self-modifying simulation adventure from a few years ago.

Anyway, back to TypeScript. It just seems to take the biggest pain point with JS and pretty much eradicate it completely.

I recently converted a couple of code bases to TS and even though the vanilla JS version seemingly “worked”, during the conversion process TS flagged issues that made me question how my previous implementation ever ran…accidental reuse of functions as variable names, using vars that were never defined, etc…But it “worked”! Imagine how much time this probably saved me debugging tiny runtime issues down the line.

The only thing I found a bit fiddly with TypeScript was finding a good packaging and deployment flow. It took about an hour to learn how to configure webpack and TypeScript to produce an output bundle ready for deployment. I also had to define a custom module to deal with images when convering a normal JavaScript webpack project to a TypeScript project. I am now faced with a bundle that is too large for comfort, although this will be a matter of learning more about webpack configuration rather than TypeScript.

TypeScript has also made me curious about other languages that can compile to JS, like Kotlin and Go (which I still love dearly).

© - 2022 · Liza Shulyayeva ·

privacy policy