This repo holds the source code from completing the Codecademy Learn TypeScript course projects.
- Types
- Functions
- Complex Types
- Union Types
- Type Narrowing
- Advanced Object Types
- Node.js
- TypeScript compiler (tsc)
To run these TypeScript apps locally, follow the steps below:
-
Clone this repository to your local machine:
git clone https://github.com/arsy786/ts-projects-codecademy.git
-
Navigate to the specific project directory that contains the
.ts
file you want to run:cd ts-projects-codecademy/path/to/project
-
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 thetsconfig.json
configuration found in the same directory. -
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.
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)