This is your lab for today! ๐
We have learned some super useful things about TypeScript in class. Please keep reading and work on the following iterations.
- Fork this repo
- Clone this repo
- Upon completion, run the following commands
$ git add .
$ git commit -m "done"
$ git push origin master
Will be explained in class
There are 6 small exercises within this. Hover over the red squigglies and fix each error that you see.
To run this part of the exercise, open your terminal and type
ts-node index.ts
By doing that it's running the uncommented lines in index.ts
import exercise1 from './src/Exercise_1_Basic_Types/exercise1';
exercise1();
You will see a lot of errors in your terminal. Your task is to fix those errors by looking at the exercise1.ts
file in Exercise_1_Basic_Types
folder.
In case you're stuck for too long, uncomment these two lines in index.ts
and comment out the two lines from above to see the solution.
// ======== Solution 1: Basic types ========
import solution1 from './src/Exercise_1_Basic_Types/solution1';
solution1();
and run ts-node index.ts
again to see the required output.
Repeat the same process for all the exercises
Happy Coding! โค๏ธ