TypeScript Typing Speed Test
TypeScript adds a whole second grammar on top of JavaScript: angle-bracket generics, colon annotations, and pipe-separated unions. If your fingers hesitate on `<T extends keyof U>`, these drills are for you.
Typing Type Annotations at Speed
TypeScript's signature friction point is the angle bracket. Generics like `Record<string, User[]>` demand Shift-comma and Shift-period reaches while your mind is mid-thought about the type itself. Union types chain the pipe character (`|`), and intersection types the ampersand (`&`) β both awkward right-hand stretches that benefit enormously from deliberate practice.
Annotation rhythm matters too: the pattern `name: Type` appears dozens of times per file, so the colon-space-capital sequence should be a single fluid motion. Utility types (`Partial<T>`, `Omit<T, K>`) and mapped types add bracket-heavy structures that reward practicing bracket pairs as unified chunks rather than individual keys.
Key Drills for TypeScript:
- Chunk the generic: Type `<T>` as one gesture. Angle brackets are the highest-frequency shifted pair in TypeScript.
- Colon-space rhythm: The `: Type` pattern is everywhere. Make colon-then-capital a reflex, not two decisions.
- Pipe without looking: Union types make `|` a daily key. Anchor your right pinky so the reach doesn't break your flow.
Sample Drill: Generic Interface & Type
Declaring generic interfaces and strict types in TypeScript.
interface ApiResponse<T> {
data: T;
status: number;
message: string;
}
type UserID = string | number;The Symbols That Slow You Down
The keystrokes below are where TypeScript typing speed is won or lost. Key positions shown for QWERTY β the pattern transfers to any layout, just on different physical keys.
| Symbol | Used For | Keys | How to Drill It |
|---|---|---|---|
| <> | Generic brackets | < as Shift+Comma, > as Shift+Period | Shifted comma and period with a type name between. The single most characteristic TS keystroke pair. |
| | | Union pipe | Shift+Backslash | One of the farthest reaches on the board. Union types make it frequent β anchor the ring-finger stretch. |
| : | Type annotation | Shift+Semicolon | Every `name: Type` pair starts here. Colon-space-capital should be one continuous motion. |
| & | Intersection | Shift+7 | Less common than the union pipe but just as awkward. Practice `A & B` without pausing at the ampersand. |
| >> | Nested generic closer | Shift+Period twice | Deep generics close in bursts: `>>` or even `>>>`. Two Shift-period strikes without releasing rhythm. |
| ?: | Optional property | ? as Shift+Slash, then : as Shift+Semicolon | Two shifted punctuation marks back to back in interface definitions. Type them as one chunk. |
Common TypeScript Typing Mistakes
- βSkipping the space after a colon in annotations β `name:Type` parses fine but the missing rhythm compounds across a file.
- βConfusing the union pipe with its unshifted backslash neighbor sitting directly beneath it.
- βDropping the closing bracket of a generic when the type name runs long β practice `Array<Map<string, number>>` end to end.
What's a Good TypeScript Typing Speed?
TypeScript runs slightly slower than plain JavaScript because of annotation overhead: 25β35 WPM is solid during real typing, and 40+ WPM with 95%+ accuracy is excellent. Generics-heavy files are where you'll feel the difference most.