Skip to main content

Overview

This guide will walk you through everything you need to start solving TypeScript challenges on TypeHero. In just a few minutes, you’ll:
  1. Create an account using GitHub OAuth
  2. Explore the challenge library
  3. Solve your first challenge in the interactive playground
  4. Submit your solution and view other approaches
TypeHero requires a GitHub account for authentication. If you don’t have one, create a GitHub account first.

Step 1: Create Your Account

1

Visit TypeHero

Navigate to typehero.dev in your browser.
TypeHero works best in modern browsers like Chrome, Firefox, Safari, or Edge.
2

Sign in with GitHub

Click the Sign In button in the navigation bar, then select Continue with GitHub.You’ll be redirected to GitHub to authorize the TypeHero application. This allows TypeHero to:
  • Create your user profile
  • Link your GitHub identity
  • Track your progress and solutions
TypeHero uses GitHub OAuth for secure authentication. Your password is never shared with TypeHero.
3

Authorize the Application

On the GitHub authorization page, review the permissions and click Authorize.After authorization, you’ll be redirected back to TypeHero, now logged in with your GitHub account.
4

Complete Your Profile (Optional)

Navigate to your profile settings to add:
  • A bio describing your TypeScript journey
  • Social links (Twitter, personal website, etc.)
  • Profile customization options
You can skip this step and complete your profile later from the account menu.

Step 2: Explore Challenges

1

Navigate to Explore

Click Explore in the navigation bar to view all available challenges.Challenges are organized by difficulty level:
  • BEGINNER — Great for those new to TypeScript’s type system
  • EASY — Perfect for learners building confidence
  • MEDIUM — Ideal for enthusiasts ready for more complexity
  • HARD — Designed for experts tackling advanced patterns
  • EXTREME — For masters seeking the ultimate challenge
  • EVENT — Special challenges from events like Advent of TypeScript
2

Choose Your First Challenge

For your first challenge, we recommend starting with Primitive Data Types from the BEGINNER category.Click on any challenge card to view:
  • Difficulty rating and tags
  • Number of attempts and completion rate
  • Challenge author
  • Brief description
Look for challenges with high completion rates when starting out — they’re great for building confidence!
3

Browse by Track (Optional)

Alternatively, visit the Tracks page to follow a curated learning path.Tracks organize related challenges in a progressive order, such as:
  • Type fundamentals (primitives, unions, literals)
  • Generic types and constraints
  • Advanced patterns (mapped types, conditional types)
  • Utility type implementations
Click Enroll on any track to add it to your learning journey.

Step 3: Solve Your First Challenge

Let’s walk through solving the Primitive Data Types challenge:
1

Read the Challenge Description

The left panel contains the problem description, which explains:
  • What problem primitive types solve
  • The concept you’re learning
  • Instructions for solving the challenge
For Primitive Data Types, you’ll learn about TypeScript’s foundational types:
number  // All numeric values
string  // Text and characters
boolean // true or false values
null    // The null value
undefined // The undefined value
Take time to read and understand the description. The context often provides hints about the solution!
2

Examine the Starter Code

The right panel shows the Monaco editor with starter code. For this challenge, you might see:
// Add type annotations to fix the errors
const myName = "TypeHero";
const myAge = 25;
const isAwesome = true;

function greet(name, age) {
  return `Hello ${name}, you are ${age} years old!`;
}
Red squiggly lines indicate type errors that need fixing.
3

Write Your Solution

Add type annotations to fix the errors. For example:
const myName: string = "TypeHero";
const myAge: number = 25;
const isAwesome: boolean = true;

function greet(name: string, age: number): string {
  return `Hello ${name}, you are ${age} years old!`;
}
The Monaco editor provides:
  • Syntax highlighting for TypeScript
  • IntelliSense with autocomplete suggestions
  • Real-time type checking showing errors as you type
  • VS Code keybindings for familiar shortcuts
Press Ctrl+Space (or Cmd+Space on Mac) to trigger autocomplete suggestions at any time.
4

Run Tests

Click the Run Tests button at the bottom of the editor to validate your solution.The test panel will show:
  • Passing tests in green
  • Failing tests in red with error messages
  • Test execution time
Example Test Cases
type test_myName = Expect<Equal<typeof myName, string>>;
type test_myAge = Expect<Equal<typeof myAge, number>>;
type test_isAwesome = Expect<Equal<typeof isAwesome, boolean>>;
If any tests fail, review the error messages and adjust your code accordingly.
5

Submit Your Solution

Once all tests pass, click Submit to save your solution.Your submission is recorded as:
  • A successful completion on your profile
  • Part of your progress tracking for the challenge
  • Stored in your submission history
You can submit multiple times! Each submission is saved, allowing you to refine your approach over time.

Step 4: View and Share Solutions

After submitting your solution, explore what others have done:
1

View Community Solutions

Click the Solutions tab to see how other developers solved the challenge.You’ll discover:
  • Different approaches and techniques
  • More concise or elegant solutions
  • Edge cases you might have missed
  • Comments explaining complex logic
Upvote solutions you find helpful! This helps surface the best approaches for other learners.
2

Share Your Solution

Click Share Solution to publish your approach to the community.When sharing, include:
  • A descriptive title summarizing your approach
  • A description explaining your thought process
  • Any insights or gotchas you discovered
Example Shared Solution
// Title: Using Conditional Types for Type-Safe Validation
// Description: This solution uses conditional types to ensure
// compile-time validation without runtime overhead.

type SafeString<T> = T extends string ? T : never;
Sharing solutions is optional but highly encouraged! Teaching others reinforces your own understanding.
3

Engage in Discussions

Comment on solutions to:
  • Ask questions about approaches you don’t understand
  • Share alternative techniques
  • Provide constructive feedback
  • Discuss TypeScript best practices
The TypeHero community is welcoming and eager to help learners at all levels.

What’s Next?

Continue Learning

Enroll in a learning track for structured progression through TypeScript concepts

Explore Features

Discover all the features TypeHero offers, from bookmarks to notifications

Create a Challenge

Design your own TypeScript challenge to share with the community

Join the Community

Connect with other TypeScript enthusiasts on Discord

Tips for Success

Even if you’re experienced with TypeScript, starting with beginner challenges helps you understand how TypeHero works and builds confidence. The difficulty ramps up quickly!
Test cases often provide hints about edge cases and requirements. Understanding what the tests expect is key to crafting correct solutions.
Keep the TypeScript Handbook open for reference. TypeHero challenges often require knowledge of specific TypeScript features documented there.
Challenge descriptions provide valuable context and learning material. They often explain the “why” behind a TypeScript feature, not just the “how.”
Your first solution doesn’t need to be perfect. Submit a working solution, then review others’ approaches and refine your own. This iterative process accelerates learning.
Stuck on a challenge? Ask in the comments or on Discord. The community is friendly and supportive of learners at all levels.

Keyboard Shortcuts

The Monaco editor supports many VS Code shortcuts:
ShortcutAction
Ctrl+S / Cmd+SSave current code
Ctrl+SpaceTrigger autocomplete
Ctrl+/ / Cmd+/Toggle line comment
Shift+Alt+FFormat document
Ctrl+F / Cmd+FFind in file
F12Go to definition
Shift+F12Find all references
The editor is a full instance of Monaco, so most VS Code editing features work as expected!

Troubleshooting

Ensure:
  • Your code has no syntax errors (check for red underlines)
  • You’re logged in (some features require authentication)
  • Your browser allows JavaScript execution
Try refreshing the page if the issue persists.
Check that:
  • You’re using a valid GitHub account
  • Pop-ups aren’t blocked (OAuth requires a popup)
  • You’ve authorized the TypeHero application on GitHub
Clear your browser cache and cookies if login still fails.
The Monaco editor is resource-intensive. For best performance:
  • Close other browser tabs running heavy applications
  • Use a modern browser (Chrome, Firefox, Safari, Edge)
  • Disable unnecessary browser extensions
  • Ensure your device meets minimum specifications
Use the search bar at the top of the Explore page to search challenges by:
  • Name or keywords
  • Author username
  • Difficulty level
TypeHero uses Algolia for fast, full-text search across all content.

Completed your first challenge? Share your achievement on Twitter with #TypeHero to celebrate your progress! 🎉

Build docs developers (and LLMs) love