TypeScript Quickly

Book description

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.

About the Technology
Strong typing can eliminate nearly all errors caused by unanticipated data values. With TypeScript, an enhanced version of JavaScript, you can specify types and type annotations so your code is easier to read and far less likely to fail at runtime. And because the core of TypeScript is standard JavaScript, it runs on all major browsers and can be used with frameworks like Angular, Vue, and React.

About the Book
TypeScript Quickly teaches you to exploit the benefits of types in browser-based and standalone applications. In this practical guide, you’ll build a fascinating blockchain service app that takes you through a range of type-sensitive programming techniques. As you go, you’ll also pick up valuable techniques for object-oriented programming with classes, interfaces, and advanced features such as decorators and conditional types. 

What's Inside
  • Mastering TypeScript syntax
  • Using TypeScript with JavaScript libraries
  • Tooling with Babel and Webpack
  • Developing TypeScript apps using Angular, React, and Vue


About the Reader
For web developers comfortable with JavaScript and HTML.

About the Authors
Yakov Fain and Anton Moiseev are experienced web developers. They have authored two editions of Manning’s Angular Development with TypeScript.

Quotes
I’ve seen the future and it is TypeScript—Yakov Fain and Anton Moiseev will take you there.
- Guy Langston, Axio Quant

TypeScript is the most important language to learn today, and this book is a perfect way to learn it.
- Jerry Stralko, Wolters Kluwer

Great resource to get started with and to master TypeScript.
- Deniz Vehbi, Tesco

A well-paced book that benefits greatly from the experience of the authors.
- George Thomas, Manhattan Associates

Table of contents

  1. Copyright
  2. Brief Table of Contents
  3. Table of Contents
  4. Preface
  5. Acknowledgments
  6. About This Book
  7. About the Cover Illustration
  8. Part 1. Mastering the TypeScript syntax
    1. Chapter 1. Getting familiar with TypeScript
      1. 1.1. Why program in TypeScript
      2. 1.2. Typical TypeScript workflows
      3. 1.3. Using the Typescript compiler
      4. 1.4. Getting familiar with Visual Studio Code
      5. Summary
    2. Chapter 2. Basic and custom types
      1. 2.1. Declaring variables with types
      2. 2.2. Defining custom types
      3. 2.3. The any and unknown types, and user-defined type guards
      4. 2.4. A mini project
      5. Summary
    3. Chapter 3. Object-oriented programming with classes and interfaces
      1. 3.1. Working with classes
      2. 3.2. Working with interfaces
      3. Summary
    4. Chapter 4. Using enums and generics
      1. 4.1. Using enums
      2. 4.2. Using generics
      3. Summary
    5. Chapter 5. Decorators and advanced types
      1. 5.1. Decorators
      2. 5.2. Mapped types
      3. 5.3. Conditional types
      4. Summary
    6. Chapter 6. Tooling
      1. 6.1. Source maps
      2. 6.2. The TSLint linter
      3. 6.3. Bundling code with Webpack
      4. 6.4. Using the Babel compiler
      5. 6.5. Tools to watch
      6. Summary
    7. Chapter 7. Using TypeScript and JavaScript in the same project
      1. 7.1. Type definition files
      2. 7.2. A sample TypeScript app that uses JavaScript libraries
      3. 7.3. Introducing TypeScript in your JavaScript project
      4. Summary
  9. Part 2. Applying TypeScript in a blockchain app
    1. Chapter 8. Developing your own blockchain app
      1. 8.1. Blockchain 101
      2. 8.2. Developing your first blockchain
      3. Summary
    2. Chapter 9. Developing a browser-based blockchain node
      1. 9.1. Running the blockchain web app
      2. 9.2. The web client
      3. 9.3. Mining blocks
      4. 9.4. Using crypto APIs for hash generation
      5. 9.5. The standalone blockchain client
      6. 9.6. Debugging TypeScript in the browser
      7. Summary
    3. Chapter 10. Client-server communications using Node.js, TypeScript, and WebSockets
      1. 10.1. Resolving conflicts using the longest chain rule
      2. 10.2. Adding a server to the blockchain
      3. 10.3. The project structure
      4. 10.4. The project’s configuration files
      5. 10.5. A brief introduction to WebSockets
      6. 10.6. Reviewing notification workflows
      7. Summary
    4. Chapter 11. Developing Angular apps with TypeScript
      1. 11.1. Generating and running a new app with Angular CLI
      2. 11.2. Reviewing the generated app
      3. 11.3. Angular services and dependency injection
      4. 11.4. An app with ProductService injection
      5. 11.5. Programming to abstractions in TypeScript
      6. 11.6. Getting started with HTTP requests
      7. 11.7. Getting started with forms
      8. 11.8. Router basics
      9. Summary
    5. Chapter 12. Developing the blockchain client in Angular
      1. 12.1. Launching the Angular blockchain app
      2. 12.2. Reviewing AppComponent
      3. 12.3. Reviewing TransactionFormComponent
      4. 12.4. Reviewing the BlockComponent
      5. 12.5. Reviewing services
      6. Summary
    6. Chapter 13. Developing React.js apps with TypeScript
      1. 13.1. Developing the simplest web page with React
      2. 13.2. Generating and running a new app with Create React App
      3. 13.3. Managing a component’s state
      4. 13.4. Developing a weather app
      5. 13.5. What’s Virtual DOM?
      6. Summary
    7. Chapter 14. Developing a blockchain client in React.js
      1. 14.1. Starting the client and the messaging server
      2. 14.2. What changed in the lib directory
      3. 14.3. The smart App component
      4. 14.4. The TransactionForm presentation component
      5. 14.5. The PendingTransactionsPanel presentation component
      6. 14.6. The BlocksPanel and BlockComponent presentation components
      7. Summary
    8. Chapter 15. Developing Vue.js apps with TypeScript
      1. 15.1. Developing the simplest web page with Vue
      2. 15.2. Generating and running a new app with Vue CLI
      3. 15.3. Developing single-page apps with router support
      4. Summary
    9. Chapter 16. Developing the blockchain client in Vue.js
      1. 16.1. Starting the client and the messaging server
      2. 16.2. The App component
      3. 16.3. The TransactionForm presentation component
      4. 16.4. The PendingTransactionsPanel presentation component
      5. 16.5. The BlocksPanel and Block presentation components
      6. Summary
      7. Epilogue
  10. Appendix. Modern JavaScript
    1. A.1. How to run the code samples
    2. A.2. The keywords let and const
    3. A.3. Template literals
    4. A.4. Optional parameters and default values
    5. A.5. Arrow function expressions
    6. A.6. The rest operator
    7. A.7. The spread operator
    8. A.8. Destructuring
    9. A.9. Classes and inheritance
    10. A.10. Asynchronous processing
    11. A.11. Modules
    12. A.12. Transpilers
  11. Index
  12. List of Figures
  13. List of Tables
  14. List of Listings

Product information

  • Title: TypeScript Quickly
  • Author(s): Yakov Fain, Anton Moiseev
  • Release date: March 2020
  • Publisher(s): Manning Publications
  • ISBN: 9781617295942