TypeScript Fundamentals

TypeScript Fundamentals

MCQ Practice Course

Practice TypeScript online with 1,600+ free MCQs — from type annotations and interfaces through generics, utility types, narrowing, and tsconfig. Instant explanations on every wrong answer; React, Node, and interview-ready prep.

1,639practice MCQs8learners16h of content
✓ Free forever🎯 Instant explanations⚡ Start in 30 seconds

What you'll learn

  • Annotate variables, parameters, and return values with TypeScript's primitive, literal, array, and tuple types — pick the precise type for the shape and value range your code needs.
  • Design contracts with interfaces — declaration merging, function and class interfaces, and the rules for extending and re-opening interfaces across modules.
  • Compose flexible types with type aliases, unions, and intersections; choose between interfaces and type aliases for the right situation.
  • Type functions correctly — parameter and return annotations, function overloads, rest and spread parameters, and the higher-order patterns generics make safe.
  • Use access modifiers, abstract classes, and inheritance for OO design; layer on generics — functions, classes, constraints — to write reusable, type-safe abstractions.
  • Reach for the right enum pattern (numeric, string, const, or literal-union) without falling into the runtime-vs-compile-time pitfalls that catch most TypeScript beginners.
  • Narrow types using built-in checks (typeof, instanceof, in), user-defined type guards, and control-flow analysis — write null-safe code without casts.
  • Apply utility types (Partial, Required, Readonly, Pick, Omit, Exclude, Extract, ReturnType) and configure tsconfig.json strict-mode flags for production-grade type safety.

Curriculum

Primitive & Special Types
  • string, number and boolean type annotations
  • any type behavior and risks
  • unknown type vs any
  • never type behavior
Literal & Special Value Types
  • literal types (string, number, boolean literals)
  • null and undefined types
  • void type usage
  • object type vs Object vs {}
Arrays & Tuples
  • array type annotation (T[] vs Array<T>)
  • tuple type definition and access
  • tuple with optional and rest elements
  • readonly arrays and tuples

About this course

TypeScript is the type layer on top of JavaScript that the entire modern frontend and Node ecosystem has standardised on. React projects, Next.js apps, Node backends, and most new open-source libraries ship in TypeScript by default. This free course gives you 1,600+ practice MCQs covering the full span of TypeScript — from basic type annotations and interfaces to generics, narrowing, utility types, and strict-mode configuration — all with instant explanations on every wrong answer.

The course is built around how TypeScript is actually tested in interviews and used in real codebases: short snippets where you predict whether the code compiles, pick the precise type a generic infers, or identify which utility type produces the target shape. We don't dump theory at you. Instead, you practice one MCQ at a time, see exactly why your answer was wrong (or why the right answer worked), and move on. Twelve topics, three subtopics each, every question vetted and mapped — that's the structure.

Quick facts

  • Format — 1,600+ free practice MCQs across 12 top-level topics, with instant explanations after every wrong answer.
  • Duration — about 16 hours of focused practice; most learners spread it over 2–3 weeks.
  • Level — beginner to advanced. Start from basic annotations, finish with generic patterns, declaration files, and strict-mode tsconfig.
  • Cost — completely free, including the verifiable completion certificate.
  • Audience — JavaScript developers moving to TypeScript, React/Node engineers, interview candidates, and engineering students writing modern frontend code.
  • Prerequisite — comfortable with JavaScript fundamentals. If not, start with JavaScript Fundamentals first.

Who is this TypeScript course for?

Four audiences. First, JavaScript developers who are tired of runtime type errors and want to move to TypeScript on the job — this course gives you the exact mental model shift in 16 hours. Second, React, Next.js, and Node engineers who use TypeScript daily but feel uncertain on generics, narrowing, and utility types — the depth and mastery layers tighten those skills. Third, interview candidates preparing for frontend or full-stack roles where TypeScript is now a default expectation; this course covers the question patterns interviewers actually ask. Fourth, engineering students and bootcamp graduates writing their first TypeScript projects — the foundations layer assumes nothing beyond JavaScript familiarity.

What you'll learn in this TypeScript course

The curriculum is organised into three layers that map directly to the 12 topics. You can take them in order or jump to whichever layer matches your current level.

Foundations

  • Type Annotations & Basic Types — primitive, literal, and special types (any, unknown, never, void); arrays and tuples; when to annotate and when to let inference do the work.
  • Interfaces — interface definitions, extension, declaration merging, and the rules for function and class interfaces.
  • Type Aliases, Unions & Intersections — composing types with | and &; when an interface beats a type alias and vice versa.
  • Functions in TypeScript — function type annotations, overloads, rest/spread, and the higher-order patterns generics make safe.

Depth

  • Classes in TypeScript — class members and access modifiers (public, private, protected), abstract classes, inheritance, and class type compatibility (structural typing applied to classes).
  • Generics — 460 questions on generic basics, generic classes and interfaces, and the patterns that real library code uses (constraints, default type parameters, conditional types). The largest topic in the course because it's where most TypeScript questions live.
  • Enums — numeric enums, string enums, and the runtime-vs-compile-time pitfalls; when literal-union types beat enums.
  • Type Narrowing & Guards — built-in narrowing (typeof, instanceof, in), user-defined type guards, and control-flow analysis that lets you write null-safe code without casts.

Mastery

  • Utility Types — Partial, Required, Readonly, Pick, Omit, Exclude, Extract, ReturnType, InstanceType, Parameters; how each one is implemented and when to reach for it.
  • Modules & Declaration Files — the module system, writing .d.ts declaration files for plain JavaScript, and module augmentation for extending third-party types.
  • TypeScript Configuration — tsconfig.json options, the strict-mode flag bundle (strictNullChecks, noImplicitAny, strictFunctionTypes), and compiler/interop options for mixed JS/TS codebases.
  • TypeScript Review & Mastery — mixed-topic questions that don't tell you the topic up front. Simulates real interview pressure.

TypeScript vs JavaScript — when does TypeScript actually pay off?

TypeScript is JavaScript plus a static type checker. The runtime is identical — TypeScript compiles to JavaScript and disappears at build time. What you gain is compile-time safety: most of the runtime errors that hit JavaScript apps (undefined property access, wrong-shape API responses, refactor-induced bugs) get caught while you type. What you pay is a learning curve (this course closes it in ~16 hours) and a small build step.

For solo scripts or small prototypes, JavaScript alone is fine. For anything with more than two contributors or anything that needs to run in production for more than a few months, TypeScript pays off in fewer bugs, easier refactors, and better editor autocomplete. That's why most React projects, every major framework (Next.js, Remix, NestJS), and the bulk of new npm libraries are TypeScript by default in 2026. If you're rusty on JavaScript itself, work through JavaScript Fundamentals first — TypeScript layers cleanly on top once the JS mental model is solid.

What's the best way to learn TypeScript?

Read the official handbook once for the syntax, then practice MCQs to internalise the rules. TypeScript is dense with rules that look small but matter — variance, narrowing, the difference between unknown and any, generic inference, literal-type widening. Reading examples gives you the surface; solving hundreds of questions is what cements which rule applies in which situation. Every wrong answer on Abekus triggers a written explanation that names the rule, the trap, and the fix.

Pair the MCQ practice with a small TypeScript project — a CLI tool, a small React component library, or a refactor of an existing JS file to TS. Three or four hours a week on a project alongside daily MCQ practice consolidates the knowledge into working code.

How MCQ-based TypeScript practice works on Abekus

You see one question at a time. It's usually a 5–15 line TypeScript snippet — you predict whether the code compiles, pick the inferred type, or identify the precise utility type that produces a target shape. If you're right, you move on. If you're wrong, you get a written explanation — which rule applies, what the inferred type actually is, why the trap caught you. No theory dump, no video, no slides. Just question → answer → explanation → next question. An AI guide is available alongside if you want a question explained differently.

How long this TypeScript course actually takes

The honest math: 1,639 MCQs at roughly 35 seconds per question works out to about 955 minutes — call it 16 hours. That's actual focused time. Most learners spread it across 2–3 weeks at 60–90 minutes per day. The foundations layer (Type Annotations, Interfaces, Type Aliases, Functions) takes about 5 hours; the depth layer (Classes, Generics, Enums, Narrowing) takes 6–7 hours — Generics alone is dense; the mastery layer (Utility Types, Modules, Configuration, Review) closes in another 4 hours.

If you're already writing TypeScript daily but feel shaky on generics and narrowing, skim the foundations layer and spend real time on Generics and Type Narrowing & Guards — those two topics together are about 600 questions and contain most interview-worthy material.

What to take alongside or after this TypeScript course

Three natural companions. JavaScript Fundamentals if your JS basics are rusty — TypeScript questions assume you understand closures, this, and the prototype chain. React Fundamentals if you'll be writing TypeScript with React, which is the dominant industry pairing — TypeScript props, generic components, and event types all need React context to make sense. Node.js if you're building TypeScript on the backend; declaration files, module systems, and tsconfig settings shift slightly between frontend and Node setups. The completion certificate from this course is publicly verifiable and can be added to your resume or LinkedIn profile.

What learners say

R
Rishi M.

Solid coverage end to end. The Enums topic was the surprise — I'd been using numeric enums everywhere and the explanations on when literal-union types are a better fit shifted how I model state. Cleared a frontend interview at a fintech startup using exactly this material.

S
Soumya R.

The tsconfig and Declaration Files topics are rare to find with proper depth. Strict-mode flags, module resolution, and writing .d.ts for plain JS libraries are mostly Stack Overflow territory otherwise. Now I actually understand what every line in tsconfig.json does.

P
Pratham J.

Utility Types is where I got the most value. Pick, Omit, Partial — I'd used them but never understood the implementation. Seeing how each one is built from mapped and conditional types changed how I read library .d.ts files. Wish there were more questions on ReturnType edge cases.

M
Mansi T.

Type Narrowing & Guards finally made discriminated unions click for me. I'd been writing TS at work for a year and still casting half the time. After this topic I stopped reaching for `as` and started writing user-defined guards. Code reviews got noticeably shorter.

V
Vedant K.

Took the course before a Next.js role interview. The 460-question Generics topic alone is worth the price — conditional types, mapped types, inference quirks. Walked into the live coding round and the generic signature questions felt familiar. Got the offer.

Frequently asked questions