▶Book Description
TypeScript is an open source and cross-platform typed superset of JavaScript that compiles to plain JavaScript that runs in any browser or any host. TypeScript adds optional static types, classes, and modules to JavaScript, to enable great tooling and better structuring of large JavaScript applications.
This book is a step-by-step guide that will get you started with TypeScript with the help of practical examples. You start off by understanding the basics and the new features of TypeScript 2.x. Next, you will learn to automate your development workflow with tools such as Grunt. Following this, you will be explained in detail about function, generics, and callbacks. Post this, object-oriented features and the memory management functionality of TypeScript are explained in detail. Going forward, you will be introduced to Functional Programming with TypeScript and will delve into Asynchronous programming principles. Finally, you will be introduced to the performance parameters and will learn to test your application.
By the end of this book, you will have learned enough to implement all the concepts with the latest features of TypeScript to build a single page application from scratch.
▶What You Will Learn
⦁ Learn the key TypeScript language features and language runtime
⦁ Develop modular, scalable, maintainable, and adaptable web applications
⦁ Create object-oriented code that adheres to the solid principles
⦁ Save time using automation tools like Gulp, Webpack, Ts node and Karma
⦁ Develop robust applications with testing (Mocha, Chai and SinonJS)
⦁ Put your TypeScript skills into practice by developing a single-page web application framework from scratch
⦁ Use the JavaScript of tomorrow (ES6 and ES7) today with TypeScript
▶Key Features
⦁ Learn how to develop modular, scalable, maintainable, and adaptable web applications by taking advantage of TypeScript
⦁ A comprehensive guide that explains the fundamentals of TypeScript with the help of practical examples
⦁ Enhance your web development skills and accelerate your development using TypeScript 2.x
▶Who This Book Is For
If you are a developer aiming to learn TypeScript to build attractive web applications, this book is for you. No prior knowledge of TypeScript is required. However, a basic understanding of JavaScript would be an added advantage.
▶What this book covers
⦁ Chapter 1, Introducing TypeScript, helps you to get familiar with the TypeScript basics. This chapter explores the purpose, main features, and benefits of the TypeScript programming language.
⦁ Chapter 2, Working with Types, teaches you how to make the most out of the TypeScript type annotations and its type inference system. This chapter will teach you how to use powerful features, such as union types or mapped types.
⦁ Chapter 3, Working with Functions, covers how to work with functions in depth. This chapter will teach you how to take advantage of the power of functions and asynchronous programming in TypeScript.
⦁ Chapter 4, Object-Oriented Programming with TypeScript, deals with the core concepts of the object-oriented programming (OOP) paradigm, such as polymorphism, inheritance, and encapsulation. This chapter also explores some OOP best practices, such as the SOLID principles.
⦁ Chapter 5, Working with Dependencies, explores how to work with application dependencies, third-party dependencies, and type definitions. This chapter explores multiple module systems, such as CommonJS and ES6 modules, and concepts such as dependency injection.
⦁ Chapter 6, Understanding the Runtime, teaches you how the JavaScript runtime works and helps you gain a good understanding of concepts such as the event loop, closures, and hoisting.
⦁ Chapter 7, Functional Programming with TypeScript, explores the core building blocks of the functional programming paradigm, including concepts such as function composition, function partial application, and referential transparency.
⦁ Chapter 8, Working with Decorators, showcases how to apply and declare decorators and how to use decorators to create and read metadata that can be used to power tools such as testing frameworks and inversion of control containers.
⦁ Chapter 9, Automating Your Development Workflow, focuses on how to automate certain tasks in your development workflow and reduce the number of integration issues, using tools, such as TSLint, webpack, Gulp and npm scripts.
⦁ Chapter 10, Node.js Development with TypeScript, teaches you how to use REST APIs powered by Node.js and TypeScript.
⦁ Chapter 11, Frontend Development with React and TypeScript, enables you to learn how to develop single-page web applications powered by React and TypeScript.
⦁ Chapter 12, Frontend Development with Angular and TypeScript, teaches you how to develop single-page web applications powered by Angular and TypeScript.
⦁ Chapter 13, Application Performance, makes you understand how the availability of system resources can affect the performance of a TypeScript application, and how to use the Node.js inspector and the Chrome Development tools to analyze the performance of a TypeScript application.
⦁ Chapter 14, Application Testing, teaches you how to implement automated tests such as unit tests or end-to-end tests powered by tools such as Mocha, Chai, Sinon.JS, Supertest, and Karma.
⦁ Chapter 15, Working with the TypeScript Compiler and the Language Services, explores how to leverage the TypeScript language services to create your own code analysis tools.