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

Absolutely great book that goes beyond the official documentation and makes some great cases for OOP and Typescript.

Onofrei George
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 Enums and Generics

4.1 Enums

4.1.1 String enums

4.1.2 const enums

4.2 Generics

4.2.1 Understanding generics

4.2.2 Creating your own generic types

4.2.3 Creating generic functions

4.3 Summary

5 Decorators and advanced types

5.1 Decorators

5.1.1 Creating class decorators

5.1.2 Creating method decorators

5.2 Mapped types

5.2.1 The mapped type Readonly

5.2.2 Declaring your own mapped types

5.2.3 Other built-in mapped types

5.3 Conditional types

5.3.1 The keyword infer

5.4 Summary

5.5 Tuples

6 Tooling

6.1 Source maps

6.2 The linter TSLint

6.3 Bundling code with Webpack

6.3.1 Bundling JavaScript with Webpack

6.3.2 Bundling TypeScript with Webpack

6.4 Using the Babel transpiler

6.4.1 Using Babel with JavaScript

6.4.2 Using Babel with TypeScript

6.4.3 Using Babel with TypeScript and Webpack

6.5 Tools to watch

6.5.1 Deno

6.5.2 ncc

6.6 Summary

7 Using TypeScript and JavaScript in the same project

7.1 Type definition files

7.1.1 Getting familiar with type definition files

7.1.2 Type definition files and IDEs

7.1.3 Shims and type definitions

7.1.4 Creating your own type definition files

7.2 A sample TypeScript app that uses JavaScript libraries

7.3 Introducing TypeScript in your JavaScript project

7.4 Summary

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 Client-server communications using Node.js, TypeScript, and WebSockets

10.1 Resolving conflicts using the longest chain rule

10.2 Adding a server to the blockchain

10.3 The project structure

10.4 Configuration files of the project

10.4.1 Configuring the TypeScript compilation

10.4.2 What’s in package.json

10.4.3 Configuring nodemon

10.4.4 Running the blockchain app

10.5 A brief introduction to WebSockets

10.5.1 Comparing HTTP and WebSocket protocols

10.5.2 Pushing data from a Node server to a plain client

10.6 Reviewing notifications workflows

10.6.1 Reviewing the server’s code

10.6.3 Reviewing the client’s code

10.7 Summary

11 Developing a blockchain app using Angular

12 Developing a blockchain app using React.js

13 Developing a blockchain app using Vue.js


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.
MEAP combo $49.99 pBook + eBook + liveBook
MEAP eBook $39.99 pdf + ePub + kindle + liveBook

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks