Think from a JavaScript programmer’s point of view and understand TypeScript step by step.
About the book
-
Online reading (deployed on GitBook, may require scaling walls)
-
Read online (GitHub)
-
Making the address
-
Author: xcatliu
-
Official QQ group: Join QQ group 767142358
This book is a compilation of study notes after the author learned TypeScript.
This book will be updated as our understanding of TypeScript and the TypeScript community grows.
-
If you find a problem with an article, you can comment directly at the bottom of the page
-
For suggestions on projects, you can submit an issue to the author for feedback
-
You are welcome to contribute directly to pull-Request
Why write a book
TypeScript has official manuals and unofficial Chinese versions, but each chapter is expected to describe a concept in detail. As a result, previous chapters cover much of what is learned later, rather than the basics that should have been learned at the beginning. If you are a beginner, you may need to read it several times to understand. So it’s better for looking up than studying.
Unlike the official manual, this book focuses on summarizing thoughts from the perspective of JavaScript programmers and understanding TypeScript step by step, hoping to provide some help and inspiration.
Since some knowledge points are highly compatible with the official manual, it is recommended to read the Chinese manual directly in the corresponding chapters.
About the TypeScript
TypeScript is a superset of JavaScript that provides a type system and support for ES6. It is developed by Microsoft and originated on GitHub.
It was first released in October 2012 and has undergone several updates to become a force in the front-end community, not only within Microsoft, but also in Google’s Angular2 development language using TypeScript.
Suits the crowd
This book is suitable for the following people
-
Familiar with JavaScript and have read JavaScript Advanced Programming at least once.
-
For an introduction to ES6, it is recommended to read ECMAScript 6
-
Know node.js and can install and use some tools with NPM
-
Want to learn about TypeScript or have a deeper understanding of TypeScript
This book is not suitable for the following people
-
No system has ever learned JavaScript
-
Already familiar with TypeScript
evaluation
Getting Started with TypeScript is a comprehensive introduction to TS’s powerful typing system. Complete and concise, it is rich in examples and easier to read than the official documentation, making it a great first book for beginners.
– nguyen half-stretching
directory
-
preface
-
Introduction to the
-
What is a TypeScript
-
Install the TypeScript
-
Hello TypeScript
-
-
basis
-
Primitive data type
-
Any value
-
Type inference
-
The joint type
-
The type of the object — interface
-
Array type
-
Type of function
-
Types of assertions
-
Declaration file
-
Built-in objects
-
-
The advanced
-
Type the alias
-
String literal type
-
tuples
-
The enumeration
-
class
-
Classes and interfaces
-
The generic
-
A statement to merge
-
Further reading
-
-
engineering
-
Code review
-
-
Thank you
Copyright licensing
This book is licensed under the “Keep Your Name – Non-commercial” Creative Commons 4.0 license.
You are free to read, share, and modify this book as long as you maintain your original attribution and are not for commercial use.
For details of the law, see creative Commons.
The relevant data
-
The TypeScript’s official website
-
Handbook (Chinese version)
-
ECMAScript introduction to 6
-
Next chapter: Introduction