Skip to main content
Top

2014 | Book

Pro TypeScript

Application-Scale JavaScript Development

insite
SEARCH

About this book

JavaScript is everywhere, both as a pure language and in popular libraries like Angular, jQuery and Knockout, but users of modern object-oriented languages like Java and C# often find JavaScript frustrating to use and hard to extend to large-scale applications. TypeScript is an innovative open source language from Microsoft that combines powerful language features and enhanced tooling support with the key attractions of JavaScript as a flexible, dynamic language that can run in any browser and on any operating system. Pro TypeScript tells you everything you need to know about this exciting new language and how to use it in your applications.

Starting with an introduction to the language and its features, the book takes you through some of the major features of TypeScript in depth, from working with the type system through object-orientation to understanding the runtime and the TypeScript compiler. The book then covers some of the factors you need to consider when running a TypeScript application in the browser, including interacting with the DOM, making asynchronous requests, and working with useful browser APIs, followed by a demonstration of server-side TypeScript using the popular Node.js framework.

Because TypeScript compiles to plain JavaScript, exception handling, memory management and garbage collection can differ depending on where you run your program, so these topics get a chapter to themselves. You’ll also find out how to include popular JavaScript frameworks in your applications, so you can combine the benefits of TypeScript with some of the best JavaScript code that’s already out there waiting to be used. The final chapter gives an overview of automated testing for TypeScript applications.

Pro TypeScript offers a balanced and practical guide to a language that will transform your experience of JavaScript development.

Table of Contents

Frontmatter
Chapter 1. TypeScript Language Features
Abstract
■■■
Steve Fenton
Chapter 2. The Type System
Abstract
■■■
Steve Fenton
Chapter 3. Object Orientation in TypeScript
Abstract
■■■
Steve Fenton
Chapter 4. Understanding the Runtime
Abstract
■■■
Steve Fenton
Chapter 5. Running TypeScript in a Browser
Abstract
■■■
Steve Fenton
Chapter 6. Running TypeScript on a Server
Abstract
■■■
Steve Fenton
Chapter 7. Exceptions, Memory, and Performance
Abstract
■■■
Steve Fenton
Chapter 8. Using JavaScript Libraries
Abstract
■■■
Steve Fenton
Chapter 9. Automated Testing
Abstract
■■■
Steve Fenton
Chapter 10. JavaScript Quick Reference
Abstract
If you aren't already familiar with JavaScript, this quick reference is intended to provide an overview of the basic core features of JavaScript you'll be using within a TypeScript program.
Steve Fenton
Chapter 11. TypeScript Compiler
Abstract
The TypeScript compiler may well be hidden behind your development tools, but it is worth familiarizing yourself with the various compiler options. The compiler itself is optimized for compiling entire projects, rather than individual files. Running the compiler against the whole project means that you are only loading the standard library once, rather than many times. You may find that running compilation for a single file takes nearly as long as compiling the entire project.
Steve Fenton
Chapter 12. Bitwise Flags
Abstract
As described in Chapter 1, you can use an enumeration to define bit flags. Bit flags allow a series of items to be selected or deselected by switching individual bits in a sequence on and off. To ensure that each value in an enumeration relates to a single bit, the numbering must follow the binary sequence whereby each value is a power of two, for example
Steve Fenton
Chapter 13. Coding Katas
Abstract
Coding katas have become increasingly popular since their invention in 1999. If you want to improve your programming chops, coding katas are like a sharpening block you can use to hone your skills. This appendix will explain what coding katas are and how to get the most out of them. There are some links to coding kata collections that you can use to practice your TypeScript programming.
Steve Fenton
Backmatter
Metadata
Title
Pro TypeScript
Author
Steve Fenton
Copyright Year
2014
Publisher
Apress
Electronic ISBN
978-1-4302-6790-4
Print ISBN
978-1-4302-6791-1
DOI
https://doi.org/10.1007/978-1-4302-6790-4

Premium Partner