· 3 min read

Learn TypeScript Everyday Types: 77 Flashcards, Plus the Generics Cards to Add

Learn TypeScript types with 77 flashcards: unions, narrowing, interfaces vs type aliases, literal types, as const, strictNullChecks — plus the 5 generics cards to add.

TypeScript types flashcards illustration with puzzle pieces and checkmarks

Studying. But it's also a video game. 🎮

Flashcards, quizzes and games that make you actually remember.

Start playing — it's free

Posted by

The TypeScript: Types, Interfaces & Generics deck (code VW4686, 77 cards) on Flip It follows the official Handbook chapter Everyday Types almost line by line. That makes it a solid foundation — but read the title carefully: generics never actually get taught. Card 56 literally says T<U> is "covered when learning generics". Learn the deck for what it is, then patch the gap yourself.

Study this deck: TypeScript: Types, Interfaces & Generics

1 / 10
Question

Three primitive types in TypeScript

Knew itLearning

Tap the card for the answer · swipe right if you knew it, left if not

Cards worth knowing cold

FrontBack
Main difference between interfaces and type aliasesInterfaces can be re-opened to add new properties (declaration merging), type aliases cannot
Extend a type aliasUse intersection: type Bear = Animal & { honey: boolean }
How are const variables typed vs let variables?const x = 'hello' gets type 'hello', let x = 'hello' gets string
Literal inference{ method: 'GET' } gets type string, not 'GET'
Fix literal inference issuesUse as const on the object, or assertions on specific properties
How can you force an impossible type assertion?Double assertion: expr as any as T
Runtime checking for type assertionsNone — no exception or null if the assertion is wrong
Why is TypeScript structurally typed?It only cares about the structure of types, not their names

What the 77 cards cover

Primitives (string, number, boolean, bigint with the n suffix, symbol), why lowercase beats String/Number, arrays (number[] vs Array<number>), any and noImplicitAny, type annotations vs type inference, contextual typing in forEach, return types and Promise<number>, inline object types, optional properties and optional chaining, union types, narrowing with typeof and Array.isArray, type aliases, interfaces, extends, declaration merging, type assertions (as and angle brackets, banned in .tsx), literal types, as const, null/undefined, strictNullChecks, the non-null assertion !, tuples, and enums.

Two tips specific to this deck

1. Merge the duplicates into contrast pairs. About ten cards say the same thing twice: optional syntax (12 and 44), declaration merging (21 and 42), narrowing (16, 17, 48), any (4 and 60). Keep the question-form version and turn the rest into contrasts: interface extends vs type &, const vs let inference, as vs !. Interviewers ask the contrast, not the definition. Also fix card 47: TypeScript does not fall back to any everywhere — with noImplicitAny on, an uninferable parameter is an error.

2. Write the generics cards the title promises. Add five: function identity<T>(arg: T): T, a constraint (<T extends { length: number }>), keyof with <T, K extends keyof T>, a generic interface (interface Box<T> { value: T }), and a default (<T = string>). And upgrade the enum cards (73-74): since TypeScript 5.8, the --erasableSyntaxOnly flag rejects enums because Node's built-in type stripping can't erase them — a concrete reason behind the deck's "maybe hold off".

Study order

Cards 1-19 (primitives to unions) first, then 20-31 (interfaces, assertions, literals), then the null-safety block. Type each code back into a .ts file with strict: true — the compiler errors are the fastest feedback loop you'll get.

Already know the runtime side? Pair this deck with our guide to JavaScript ES6+ features.

Search for VW4686 in the Flip It library to start.

Ready to learn faster? 🚀

Join FLIP IT for free and turn studying into a game.

Create my free account