Quickstart Guide
Get up and running with TypeScript Exercises in just a few minutes. This guide will walk you through accessing the platform, understanding the interface, and completing your first exercise.Accessing the Platform
TypeScript Exercises runs entirely in your browser - no installation required!Open the platform
Navigate to https://typescript-exercises.github.io/ in a modern web browser (Chrome, Firefox, or Safari recommended).
Wait for initialization
The platform will load the Monaco Editor and TypeScript compiler. This may take a few seconds on first load.
No account creation or sign-in required. Your progress is automatically saved in your browser’s local storage.
Understanding the Interface
The platform interface is divided into several key areas:Key Interface Elements
Header
Contains the navigation bar with exercise numbers and theme toggle
File Sidebar
Shows the file structure for the current exercise. Click files to switch between them.
Code Editor
Monaco Editor where you write your TypeScript code with full IDE features
Error Panel
Displays TypeScript errors that need fixing, or “Completed” when all tests pass
Completing Your First Exercise
Let’s walk through Exercise 1 step by step.Read the exercise description
Exercise 1 starts with detailed instructions in the comments. Here’s what you’ll see:From
src/exercises/1/index.ts:63-75:Examine the starter code
You’ll see code with TypeScript errors:From
src/exercises/1/index.ts:79-96:Check the error panel
The bottom panel will show TypeScript errors. These tell you what needs to be fixed.
Fix the types
Replace
unknown types with proper TypeScript definitions:- Define a
Userinterface withname,age, andoccupationproperties - Update the
usersarray type fromunknown[]toUser[] - Update the
logPersonparameter fromunknowntoUser
Watch errors disappear
As you type, the platform validates your code in real-time. When all errors are fixed, you’ll see “Completed” in the bottom panel.
Understanding the Test System
Each exercise includes atest.ts file (marked as read-only) that validates your solution.
From src/exercises/1/test.ts:1-6:
You can view test files by clicking on them in the file sidebar, but you cannot modify them. They define the requirements your solution must meet.
Navigating Between Exercises
Using the Exercise Navigation Bar
Click on exercise numbers at the top of the page to jump to any exercise:- Numbered circles - Click to navigate to that exercise
- Highlighted exercises - Indicates which exercises you’ve completed
- Current exercise - Shown with distinct styling
Using Next/Previous Buttons
- “Next exercise” button - Appears when you complete an exercise
- Manual navigation - You can skip ahead or go back at any time
Your progress is saved automatically. You can close the browser and return later to continue where you left off.
Working with Multiple Files
Some exercises have multiple editable files:Exercise 11-13: Type Declarations and Module Augmentation
Exercise 11-13: Type Declarations and Module Augmentation
These exercises include:
index.ts(read-only) - Main code that uses external librariesdeclarations/**/*.d.ts- Type declaration files you need to writenode_modules/*(read-only) - Simulated JavaScript librariestest.ts(read-only) - Type assertions to validate your solution
Getting Unstuck
If you’re having trouble with an exercise:View Solution
Click “show a possible solution” to see a reference implementation
Skip Exercise
Click “skip” to move to the next exercise without completing the current one
Compare Solutions
After completing an exercise, click “Compare my solution” to see differences
Check Documentation
Each exercise includes links to relevant TypeScript documentation
src/exercises/1/index.ts:102-103:
Development Mode (Optional)
If you want to run the platform locally:Next Steps
How It Works
Learn about the platform architecture, Monaco Editor integration, and how the test system validates your solutions