Pro TypeScript code examples
Since my book Pro TypeScript was released this week, I’ve had a ton of feedback from readers. I really appreciate all the feedback, whether it is on social media, via my contact form or through reviews – so keep it coming please.
One of the questions that has cropped up a couple of times is about the source code for the examples in the book. If you don’t fancy copying the examples from the book, you can download all of the code from the book’s page on the Apress website.
The simpler examples can all be tried out on the TypeScript Playground. The definition of simple here covers pretty much anything that doesn’t involve loading code from multiple files.
The more involved examples can be edited in any IDE that supports TypeScript, such as Visual Studio, WebStorm or one of the many others with language support. If you are using Visual Studio, the best TypeScript experience can be obtaining using Visual Studio 2013 with Update 2 (there are further updates, but Update 2 brought all the fun).
All of the examples were written using Visual Studio (premium edition) with Update 2. If you have any problems, make sure you have the update. You can check your TypeScript version using the command:
The version running on my machine currently is 22.214.171.124. Again, if you have any problems with the examples, check your TypeScript compiler version as there have been breaking changes between versions.
If you have any problems with any of the code examples, you can get an answer in one of the following ways…
I am currently the top scoring answerer on Stack Overflow for TypeScript, so if you post your question there (and if Basarat doesn’t beat me to it) I’ll answer any problems you have.
If you don’t want to post on Stack Overflow, please use my contact form and supply as much information as possible about your problem, including which listing you’re working with and I’ll post an answer here on my blog or contact you to ask for more information.