TypeScript Type Definition Practice

Official
TypeScriptIntermediate
Overview

Practical code using TypeScript type definitions and interfaces.

Rules
Mode
All LinesNormalOff
Time Limit
1:10
Mistake Limit
Unlimited
Code PreviewTypeScript
interface User {
  id: string;
  name: string;
  email: string;
  age?: number;
}

type UserRole = "admin" | "user" | "guest";

const createUser = (name: string, role: UserRole): User => {
  return {
    id: crypto.randomUUID(),
    name,
    email: `${name}@example.com`,
  };
};
Statistics
Mode
All LinesNormalOff
Time Limit
1:10
Mistake Limit
Unlimited
Created
January 20, 2026
Challengers
2
Total Attempts
3
Completions
0
Avg WPM
39.50
Avg Accuracy
93.00%
Ranking
RankUserWPMAccuracy
46.0798.8%
4093.0%

Exercise Ranking

Top typers for this exercise

Total Participants

2

Period

All Time

Total Challenges (All Users)

3

Total Practice Time (All Users)

00:03:26

Total Keystrokes (All Users)

757

Period
Sort
RankUserwpmAccuracyStarted/CompletedCorrect/StrokesTotal TimeLast Attempt
46.0798.84%1/1256/25900:01:062/3/2026, 06:06 AM
40.0093.00%2/0463/49800:02:201/20/2026, 01:35 PM
Ranking of 2 users