DEV Community

Discussion on: What are some concepts in TypeScript that you'd like to know more about?

Collapse
 
antonfrattaroli profile image
Anton Frattaroli • Edited

I converted a project to typescript recently. It was my first experience transpiling with babel and updated to webpack 4 in the process. Types existed for the majority of external libraries and adjusting interfaces was smooth. Good experience overall. Not too many issues in the code, just a lot of .toString(). I like to think of it as eslint++, where .eslintrc is the equivalent of globals.d.ts.

One issue I had was that the migration guides I found were all out of date. Lots of webpack 1 examples, some unnecessary steps.

Visual studio tooling (roslyn) was questionable where webpack watch was much better.

Collapse
 
nickytonline profile image
Nick Taylor

I'm curious why you had to do a lot of toString(). Also, for the documentation, that sounds like since you went through it with webpack 4, maybe consider throwing up a PR for webpack 4 in the docs or create an issue so that others don't stumble. 😉

Collapse
 
antonfrattaroli profile image
Anton Frattaroli

In the jQuery type, they have .val() returning string | number | string[], and the code I was working with assumed it would always be a string. Impacted field validation code quite a bit.

Maybe I'll write an article on dev.to about the migration.