ebook img

Hands-On Functional Programming with TypeScript: Explore functional and reactive programming to create robust and testable TypeScript applicatons PDF

273 Pages·2019·1.763 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Hands-On Functional Programming with TypeScript: Explore functional and reactive programming to create robust and testable TypeScript applicatons

Hands-On Functional Programming with TypeScript Explore functional and reactive programming to create robust and testable TypeScript applications Remo H. Jansen BIRMINGHAM - MUMBAI Hands-On Functional Programming with TypeScript Copyright © 2019 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 or its dealers and distributors, will be held liable for any damages caused or alleged to have been 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. Commissioning Editor: Richa Tripathi Acquisition Editor: Denim Pinto Content Development Editor: Anugraha Arunagiri Technical Editor: Ashi Singh Copy Editor: Safis Editing Project Coordinator: Ulhas Kambali Proofreader: Safis Editing Indexer: Rekha Nair Graphics: Tom Scaria Production Coordinator: Saili Kale First published: January 2019 Production reference: 1290119 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78883-143-7 www.packtpub.com To Lorraine, for being my sword in my victories and my shield in my defeats. Without your support, I wouldn't be where I am and I wouldn't be the person I am today. Thank you! – Remo H. Jansen mapt.io Mapt is an online digital library that gives you full access to over 5,000 books and videos, as well as industry leading tools to help you plan your personal development and advance your career. For more information, please visit our website. Why subscribe? Spend less time learning and more time coding with practical eBooks and Videos from over 4,000 industry professionals Improve your learning with Skill Plans built especially for you Get a free eBook or video every month Mapt is fully searchable Copy and paste, print, and bookmark content Packt.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.packt. and as a print book customer, you are entitled to a discount on the eBook com copy. Get in touch with us at for more details. [email protected] At , you can also read a collection of free technical articles, sign up www.packt.com for a range of free newsletters, and receive exclusive discounts and offers on Packt books and eBooks. Foreword When TypeScript was officially announced on October 1, 2012, the only docs available was the dense official language specification. It was not easily accessible to beginner developers as there was significant focus on syntax. Additionally, it assumed an existing intimate knowledge of JavaScript. Nevertheless, it was complete in terms of TypeScript features at the time, and JavaScript was not as feature-rich as it is today. So, it was a plausible entry point into TypeScript, and that is what I and many others at the time used to learn TypeScript. How times have changed. Over time, TypeScript has gained a number of features, and so has JavaScript. Keeping up to date now means following relevant GitHub issues and pull requests on Microsoft/TypeScript and reading up on the understanding offered by key developers. Remo is one of those key developers. I got introduced to Remo through his insightful comments on TypeScript issues and then discovered his blog ( ). Remo's blog.wolksoftware.com blog has been a great help in dissecting important features such as JavaScript decorators and explaining how they are implemented in TypeScript. I find myself linking fellow developers to his docs instead of the alternatives due to the high quality of his work. Not only has Remo been a great help in understanding TypeScript (and JavaScript), but he has also been a great asset to the TypeScript library ecosystem. One question that I commonly receive from developers is how to do dependency injection in TypeScript. My answer is always a direct link to Remo's extremely useful InversifyJS library ( ). inversify.io One of the key concerns that uninformed developers have had about TypeScript is "it only supports object-oriented programming." That is simply not true. TypeScript supports all JavaScript paradigms, and functional programming has first-class support. In fact, it provides a vital piece of famous functional programming languages (compile-time type information) for JavaScript developers. All programming tasks can be considered as simple (data plus data transformation). This is the mental model encouraged by functional programming aficionados. To have a deep understanding of functional programs as a data transform pipeline, you need a way to define your data structures. This is what is only provided by TypeScript. In the absence of TypeScript, you see various (somewhat arbitrary) syntax elements used to describe the data structures that are flowing through your functional programs. So, if you want to do world-class functional programming and your programming environment forces you (if only by convenience) to use JavaScript, please consider TypeScript and know that you are not alone. Remo H. Jansen is here to help you. Basarat Ali Syed Microsoft MVP and one of the leading global references of the TypeScript community.

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.