Mastering TypeScript - Second Edition
Copyright 2017 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2015
Second edition: February 2017
Production reference: 1210217
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-78646-871-0
www.packtpub.com
Credits
Author Nathan Rozentals | Copy Editor Safis Editing |
Reviewers Guy Fergusson Vilic Vane | Project Coordinator Izzat Contractor |
Commissioning Editor Kunal Parikh | Proofreader Safis Editing |
Acquisition Editor Nitin Dasan | Indexer Tejal Daruwale Soni |
ContentDevelopmentEditor Priyanka Mehta | Graphics Abhinash Sahu |
Technical Editor Abhishek Sharma | Production Coordinator Melwyn Dsa |
About the Author
Nathan Rozentals has been building commercial software for over 26 years and programming for a lot longer than that. Before the Internet even became a thing, he was building statistical analysis programs on mainframes. Like many programmers at that time, he helped save the world in the year 2000.
He has worked with and tried to master many object-oriented languages, starting by implementing object-oriented techniques in plain old C. Having spent many years working with C++, chasing obscure thread locking issues and recursive routines causing memory leakage, he decided to simplify his life by embracing automatic garbage collection in Java and then C#.
As the world moved from thick-client and n-tier to web technologies, his focus turned to modern web programming, and so to JavaScript. In TypeScript, he found a language in which he could bring all of the object-oriented design patterns he had learned over the years to JavaScript.
If it were not for extreme programming techniques, agile delivery, test-driven development, and continuous integration, he would have lost his mind many years ago.
When he is not programming, he is thinking about programming. To stop thinking about programming, he goes windsurfing, plays soccer, or simply watches the professionals play soccer. They are so much better at it than he is.
I would like to thank my partner, Kathy, for her support and unconditional love over the past few years. Without you, I would not be in the great space that I am.
To Ayron and Dayna, it has been great seeing you guys grow up into mature young adults. You are always in my thoughts.
To Matt, thanks for keeping us all laughing - everyone needs to see the lighter side of life.
To Mum, Dad, Rach, Tash, and Tam, thanks for your unwavering and whole-hearted support I truly appreciate all you have done for me.
Finally, to the great team at Vix, thanks for the many intense debates and discussions, and for making work such a rewarding experience.
About the Reviewers
Guy Fergusson is a passionate web developer, open source contributor, and gamer. He has built web applications for health, law enforcement, and the finance sector. He has worked with the author building Typescript applications and is now an advocate of Typescript, which he uses on a daily basis.
I would like to thank my beautiful family, my little girl, Grace, and my amazing wife, Melisa.
Vilic Vane is a JavaScript engineer with over 8 years of experience in web development. He started following the TypeScript project when it went public, and he is also a contributor to the project. He is now working on frameworks, libraries, and apps written in TypeScript. Vilic is the author of the book TypeScript Design Patterns.
www.PacktPub.com
For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at service@packtpub.com for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
https://www.packtpub.com/mapt
Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career.
Why subscribe?
- Fully searchable across every book published by Packt
- Copy and paste, print, and bookmark content
- On demand and accessible via a web browser
Customer Feedback
Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1786468719.
If you'd like to join our team of regular reviewers, you can e-mail us at customerreviews@packtpub.com. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!
Preface
The TypeScript language and compiler has been a huge success story since its release in late 2012. It quickly carved out a solid footprint in the JavaScript development community and continues to go from strength to strength. Many large-scale JavaScript projects, including projects by Adobe, Mozilla, and Asana, have made the decision to switch their code base from JavaScript to TypeScript. Recently, the Microsoft and Google teams announced that Angular 2.0 will be developed with TypeScript, thereby merging the AtScript and TypeScript languages into one.
This large-scale industry adoption of TypeScript shows the value of the language, the flexibility of the compiler, and the productivity gains that can be realized with its rich development toolset. On top of this industry support, the ECMAScript 6 and ECMAScript 7 standards are getting closer and closer to publication, and TypeScript provides a way to use features of these standards in our applications today by generating compatible JavaScript.