/ts-projects-codecademy

Repository contains a collection of projects completed as part of the Codecademy TS course.

Primary LanguageTypeScript

ts-projects-codecademy

This repo holds the source code from completing the Codecademy Learn TypeScript course projects.

Topics Covered

  • Types
  • Functions
  • Complex Types
  • Union Types
  • Type Narrowing
  • Advanced Object Types

Getting Started

Prerequisites

  • Node.js
  • TypeScript compiler (tsc)

Running the Apps

To run these TypeScript apps locally, follow the steps below:

  1. Clone this repository to your local machine:

    git clone https://github.com/arsy786/ts-projects-codecademy.git
    
  2. Navigate to the specific project directory that contains the .ts file you want to run:

    cd ts-projects-codecademy/path/to/project
  3. Compile the TypeScript files to JavaScript by running the following command in your terminal:

    tsc

    This command will compile the TypeScript file(s) (*.ts) in the current directory to JavaScript files (*.js), based on the tsconfig.json configuration found in the same directory.

  4. Once the compilation is successful, you can run the JavaScript files using Node.js. For example:

    node <filename.js>

    Replace <filename.js> with the name of the JavaScript file that was generated from the TypeScript compilation.

This setup allows you to run the JS files in the terminal and view the output directly.

Useful Links

TypeScript Cheatsheet (Codecademy)

TypeScript - The Basics (YouTube/Fireship)
TypeScript in 100 Seconds (YouTube/Fireship)
TypeScript Crash Course (YouTube/TraversyMedia)

Setting Up TypeScript w/ tsc (YouTube/HarryWolff)