Verifying Your TypeScript Installation
What you'll learn: How to confirm TypeScript installed correctly and understand what the tsc command does.
Why Verification Matters
After installing TypeScript (whether globally or locally in your project), you need to confirm it's actually available and ready to use. Think of this like checking that a new power tool turns on before starting your first project—you want to catch any issues early.
The tsc --version Command
The TypeScript compiler is called tsc (short for "TypeScript Compiler"). To verify your installation, open your terminal and run:
tsc --version
You should see output like:
Version 5.3.3
The exact version number will vary depending on when you installed TypeScript, but any version number confirms success.
Understanding the Compiler Executable
When you installed TypeScript, you actually installed a command-line program called tsc. This is the compiler executable—the actual software that reads your TypeScript code and transforms it into JavaScript that browsers and Node.js can run.
Think of tsc as a translator that lives on your computer. Running tsc --version is like asking the translator, "Are you there, and which edition of the dictionary are you using?"
What If It Doesn't Work?
If you get "command not found" or similar errors, TypeScript isn't properly installed or isn't in your system's PATH. You'll need to revisit the installation steps from the previous lessons.
Key Takeaway: Running tsc --version confirms TypeScript is installed correctly by checking that the compiler executable (tsc) is available and showing which version you have.