Preface
Sympathizers :
Aficionados:
迷
Wellspring:
intuitive :
Pragmatic:
The structure of the program is more important than the details.
Interoperability:
Ramp-up :
Polymorphism:
Javascript:
- Values:
- Immutable
- Strings
- Numbers
- Booleans
- References:
- Often-mutable
- arrays
- objects
- Functions
Chapter 1. Introduction
Typescript is the language that will power the next generation of web apps, mobile apps, NodeJS projects, and Internet of Things devices.
Using types to prevent programs from doing invalid things.
Find out your error before your users do.
Chapter 2. Typescript: A 10_000 Foot View
General compiled languages :
Steps of running a program :
- Source code (text) is parsed by a special program called a compiler, which transforms it into AST
- AST is compiled to bytecode
- Bytecode is evaluated by the runtime
Typescript :
Text — > AST — > JS —> ….
JavaScript runtime that lives in your browser, NodeJS, or whatever JavaScript engine you’re using.
let a: number = 1
let b: string = 'hello'
let c: boolean[] = [true, false]
3 + [1]
//
console.log("Hello Type Script!")
let a = 1 + 3
let b = a + 3
let c = {
apple: a,
banana: b
}
let d = c.apple * 4
Chapter 3. All About Types
Chapter 4. Functions
Chapter 5. Classes and Interfaces
Chapter 6. Advanced Types
Chapter 7. Handling Errors
Chapter 8. Asynchronous Programming
Chapter 9. Frontend and Backend Frameworks
Chapter 10. Namespaces.Modules
Chapter 11. Interoperating with Javascript
Chapter 12. Building and Running Typescript
Chapter 13. Conclusion
PREVIOUSThe Kubernets Book
NEXTHam