4 ms·
Start with a project in vanilla JavaScript (try to write your code in an idiomatic JavaScript style). Keep building on it until it gets difficult to manage, the
by mason55 8y ago
Start with a project in vanilla JavaScript (try to write your code in an idiomatic JavaScript style). Keep building on it until it gets difficult to manage, then go add TypeScript to it.
If you're not a JavaScript developer then that exercise will help you understand what a typical JavaScript project look like and where TypeScript adds value. I think that, as a Java dev, if you just start by writing TypeScript you're liable to write code that looks a lot like Java. Doing it this way helps you see TypeScript as "JavaScript with Types" instead of "Java in the browser"
- mercer 8y agoI'll second this approach provided you have some 'downtime' to work it all out. Things are much better now than when I started with TS, but it can still be a lot to take on all at once. Using TS from the start probably affects how you write your code, and it's definitely easier and less daunting to be faces with a ton of 'problems to fix'. But learning how to add TS to an existing project is a valuable skill to have.