TypeScript Quickly
Yakov Fain and Anton Moiseev
  • MEAP began November 2018
  • Publication in Spring 2019 (estimated)
  • ISBN 9781617295942
  • 350 pages (estimated)
  • printed in black & white

A no-nonsense introduction to the language that immediately gets down to business.

Kent R. Spillner
TypeScript is JavaScript with an important upgrade! By adding a strong type system to JavaScript, TypeScript can help you eliminate entire categories of runtime errors. In TypeScript Quickly, you’ll learn to build rock-solid apps through practical examples and hands-on projects under the expert instruction of experienced web developers Yakov Fain and Anton Moiseev.
Table of Contents detailed table of contents

Part 1: Mastering the TypeScript syntax

1 Getting familiar with TypeScript

1.1 A little bit of a JavaScript history

1.2 Why program in TypeScript

1.3 Typical TypeScript workflows

1.4 Using TypeScript compiler

1.5 Getting familiar with Visual Studio Code

1.6 Summary

2 Basic and custom types

2.1 Declaring variables with types

2.1.1 Basic type annotations

2.1.2 Types in function declarations

2.1.3 The union type

2.2 Defining custom types

2.2.1 Declaring type aliases

2.2.2 Using classes as custom types

2.2.3 Using interfaces as custom types

2.2.4 Structural vs nominal typing system

2.2.5 Unions of custom types

2.2.6 A mini project

2.3 Summary

3 Object-oriented programming with classes and interfaces

3.1 Working with classes

3.1.1 Getting familiar with class inheritance

3.1.2 Access modifiers public, private, protected

3.1.3 Static variables and a singleton example

3.1.4 The method super() and the keyword super

3.1.5 Abstract classes

3.1.6 Method overloading

3.2 Working with interfaces

3.2.1 Enforcing the contract

3.2.2 Extending interfaces

3.2.3 Programming to interfaces

3.3 Summary

4 More TypeScript types

5 Tooling

6 Using TypeScript with JavaScript libraries

7 Advanced TypeScript features

Part 2: Applying TypeScript in a blockchain app

8 Developing your own blockchain app

8.1 Blockchain 101

8.1.1 Hashing functions

8.1.2 What a block is made out of

8.1.3 What’s block mining

8.1.4 A mini project with hash and nonce

8.2 Developing your first blockchain

8.2.1 The project structure

8.2.2 Creating a primitive blockchain

8.2.3 Creating a blockchain with the proof of work

8.3 Summary

9 Developing a browser-based blockchain node

9.1 Running the blockchain web app

9.1.1 The project structure

9.1.2 Deploying the app using npm scripts

9.1.3 Working with the blockchain web app

9.2 The web client

9.3 Mining blocks

9.4 Using crypto APIs for hash generation

9.5 The standalone blockchain client

9.6 Debugging TypeScript in the browser

9.7 Summary

10 Developing a blockchain app using Angular

11 Developing a blockchain app using React.js

12 Developing the server-side of a blockchain

13 Implementing peer-to-peer blockchain nodes communication


Appendix A: Modern JavaScript

A.1 How to run the code samples

A.2 The keywords let and const

A.2.1 The var keyword and hoisting

A.2.2 Block scoping with let and const

A.3 Template literals

A.4 Optional parameters and default values

A.5 Arrow function expressions

A.6 The rest operator

A.7 The spread operator

A.8 Destructuring

A.8.1 Destructuring objects

A.8.2 Destructuring arrays

A.9 Classes and inheritance

A.9.1 Constructors

A.9.2 The super keyword and the super function

A.9.3 Static class members

A.10 Asynchronous processing

A.10.1 A callback hell

A.10.2 Promises

A.10.3 Resolving several promises at once


A.11 Modules

A.11.1 Imports and exports

A.12 Transpilers

About the Technology

TypeScript is an extension of JavaScript that includes key language features such as optional static typing, compile-time error catching, and auto-complete. By specifying types and type annotations, your code becomes much easier to interpret, which improves productivity and team development. In particular, TypeScript makes complex applications like SPAs much easier to maintain and extend. What’s more, you can use TypeScript with any JavaScript library, so you get full access to new features. And since it compiles to clean JavaScript code, you can run TypeScript on all major browsers!

About the book

TypeScript Quickly teaches you to build outstanding modern apps with Typescript! To start, you’ll master the TypeScript syntax, preparing you to delve into the practical examples that follow. Thanks to the authors’ easy-to-digest style, you’ll effortlessly learn about types, object-oriented programming with classes and interfaces, and using TypeScript with JavaScript libraries. You’ll discover TypeScript’s excellent tooling as you explore code-quality improvement with TSLint, debugging with source maps, unit testing, and more.

As you progress through this code-centric guide, you’ll dive into advanced features including decorators, namespaces, and dynamic imports. To clinch your new knowledge, you’ll go hands-on as you develop several different blockchain apps, step by step.

What's inside

  • Mastering TypeScript syntax
  • Object-oriented programming with classes and interfaces
  • Using TypeScript with JavaScript libraries
  • Multiple real-world code samples
  • Tooling with TSLint, source maps, and webpack
  • Developing TypeScript blockchain apps using Angular and React.js

About the reader

Written for intermediate web developers comfortable with JavaScript ES5 and HTML.

About the authors

Yakov Fain and Anton Moiseev are experienced web application developers. They authored two editions of Manning’s Angular Development with TypeScript among other technical books. Yakov is a Java champion and a prolific tech blogger at yakov.fain.com.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks

A very comprehensive book that uses non-trivial examples to quickly convey the value, concepts and techniques of TypeScript.

Paul Brown

This book has a fine balance for both the novice and the intermediate readers.

Srihari Sridharan

Great hands on guide. Ton of examples.

Polina Keselman