Programming Typescript - Making you Javascript Scaleable

img

Preface

Sympathizers :

Sympathize GIFs - Get the best GIF on GIPHY

Aficionados:

El Baile del Aficionado de Santos Laguna on Make a GIF

Wellspring:

tenor

intuitive :

Trust Your Intuition GIFs - Get the best GIF on GIPHY

Pragmatic:

Pragmatic GIFs - Get the best GIF on GIPHY

The structure of the program is more important than the details.

Interoperability:

OCT_Cover

Ramp-up :

Puppy can't get up a ramp - He's not even trying, he'sg gifs

Polymorphism:

What is polymorph

C++ Polymorphism - javatpoint

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 :

  1. Source code (text) is parsed by a special program called a compiler, which transforms it into AST
  2. AST is compiled to bytecode
  3. Bytecode is evaluated by the runtime

Typescript :

Text — > AST — > JS —> ….

image-20210201171738015

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]
// 

image-20210201172834950

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