EACUAMBA / typescript_crash_course_by_traversy_media

TypeScript Crash Course by Traversy Media

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TypeScript Crash Course By Traversy Media

Edilson Alexandre Cuamba

  1. What is it?

    1. An open source language;
    2. A superset of JavaScript(ECMAScript);
  2. Advantages

    1. Offer additional features to JavaScript including static types;
    2. Using types is completely optional;
    3. Comiles down to regular JS;
    4. Can be used for front-end JavaScript as well as backend with Node.JS;
    5. Includes most features from ES6 and ES7 (classes, arrow functions, etc);
    6. Types from 3rd party librares can be added with type definitions;
  3. Dynamic vs Static Type Languages

    1. In dynamic type languages, the type are associated with run-time values and not named explicitly in your code.
    2. In static type languages, you explicitly assign types to variables, function parameters, return values, etc;

Static Examples are: Java, C, C++, Rust, GO
Dynamic Examples are: JavaScript, Python, Ruby, PHP

Pros & Cons

Pros

  1. More Robust;
  2. Easily Spot Bugs;
  3. Predicability;
  4. Readability;
  5. Popular;

Cons

  1. More Code To Write;
  2. More to Learn;
  3. Required Compilation;
  4. Not True Static Typing;

Use it for large project or with project that you will work with a lot of people.

Compiling TypeScript

  1. Uses .ts and .tsx as extensions;
  2. TSC (TypeScript COmpiler) is used to compile .ts files down to .js files;
  3. Can watch fies and report error at compile time;
  4. Many tools include TS compilation by default;
  5. Most IDEs have great support for TS;
  6. The tsconfig.json file is used to configure how TypeScript works;

About

TypeScript Crash Course by Traversy Media


Languages

Language:TypeScript 61.9%Language:HTML 22.6%Language:CSS 15.4%