System of a Clown
A Learning TypeScript > The Type System 🥗 appetizer project. You'll practice adding in TypeScript type annotations to JavaScript code to find bugs.
🎈 Help me, please!
I planned an elaborate clown-themed surprise party for my best friend. The whole event was planned using a few files of TypeScript code I'd written.
My friend somehow caught wind of the party and enlisted the clowns' help to vandalize the program. Not only did the clowns remove or make incorrect my TypeScript type annotations, they introduced subtle bugs by subtly changing some of the values.
Could you please add correct type annotations in my files and fix any bugs detected by TypeScript? You're my surprise clown celebration's last hope! 🤡
Setup​
If you haven't yet, set up the github.com/LearningTypeScript/projects repository locally.
shell
git clone https://github.com/LearningTypeScript/projects learning-typescript-projectscd learning-typescript-projectsnpm i
shell
git clone https://github.com/LearningTypeScript/projects learning-typescript-projectscd learning-typescript-projectsnpm i
Open your editor in this project's directory:
shell
code projects/the-type-system/system-of-a-clown
shell
code projects/the-type-system/system-of-a-clown
In your terminal, run the TypeScript compiler via the tsc
script within whichever step you're working on.
For example, to start the TypeScript compiler on the first step in watch mode:
shell
npm run tsc -- --project 01-clowning-around --watch
shell
npm run tsc -- --project 01-clowning-around --watch
Note: your terminal should be in the
system-of-a-clown
directory, not the root repository's directory.
Steps​
Notes​
- Don't import code from one step into another.
- Some of the errors presented by TypeScript may use symbols or terms you haven't covered yet. That's ok! Do your best with what you know so far.