Real lines of TypeScript: interfaces, generics, union types and every colon and angle bracket that comes with them. The test above is already set to TypeScript.
Each run shuffles real TypeScript one-liners together until there are at least 55 pieces to type. Three of them, exactly as they appear:
interface User {
id: string;
email: string;
roles: Array<"admin" | "editor">;
}export type Result<T, E = Error> =
| { ok: true; value: T }
| { ok: false; error: E };export function isDefined<T>(v: T | null): v is T {
return v != null;
}Typed as tokens: interface User { id: string; email: and so on, one Space between each.
Type a piece, press Space, and move on. A piece only counts when every character is right, angle brackets included. The clock starts on your first key.
TypeScript spreads the work across a wide set of symbols. Colons lead, because every annotation needs one, followed by semicolons and braces from interfaces and object types, then angle brackets for generics. Here is how often each appears in the TypeScript test, and where it lives on a US keyboard:
| Symbol | Name | Share of symbols | Key (US layout) | Finger |
|---|---|---|---|---|
: | Colon | 15% | Shift + ; | Right little |
; | Semicolon | 12% | ; | Right little |
{ | Opening brace | 8% | Shift + [ | Right little |
} | Closing brace | 8% | Shift + ] | Right little |
= | Equals | 7% | = | Right little |
( | Opening bracket | 6% | Shift + 9 | Right ring |
) | Closing bracket | 6% | Shift + 0 | Right little |
> | Greater than | 5% | Shift + . | Right ring |
< | Less than | 4% | Shift + , | Right middle |
" | Double quote | 4% | Shift + ' | Right little |
Angle brackets are Shift plus comma and Shift plus full stop, typed with the right middle and ring fingers. Generic types like Array<"admin" mix them with quotes and capitals in a few characters, which is where slips tend to happen.
id: string is Shift plus semicolon, then Space. It comes up in nearly every line.< and >, { and } as pairs in practice so the closing one never surprises you.ReadonlyArray start with a capital. Use the Shift key on the opposite hand to the letter.|, Shift plus backslash, a long reach for the right little finger.Net words per minute counts correct characters, five to a word, and accuracy counts every key you press. You also see raw WPM, consistency, your slowest pieces and a heatmap of missed keys. Compare your TypeScript runs with each other rather than with your prose speed.
For plainer code, try the JavaScript typing test.
Real one-line snippets: an interface with a union of string literals, an assertNever helper, a Result type, a DeepPartial mapped type, a const with as const satisfies, a type guard and a Map with generic parameters. They are shuffled into every run.
TypeScript lines carry more colons for type annotations, more angle brackets for generics, more square brackets and more capitals for type names. Colons and semicolons alone are nearly a quarter of the symbols, so expect it to feel slower than JavaScript.
No. Each line is split on spaces and you type the pieces with a single space between them, so the test trains symbols and names rather than whitespace.
No. This page opens the code test in TypeScript for this visit only. Your saved code language stays as it was until you choose another in the options above the test.
Typing tests by length: 15 second typing test · 30 second test · 1 minute typing test · 2 minute test · 5 minute typing test · 10 minute test · custom text
In other languages: Spanish typing test · French typing test · German typing test · Portuguese typing test · Italian typing test · Test de mecanografía en español · Teste de digitação em português