Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
TypeScript - Practice Tests
13 students

TypeScript - Practice Tests

Types, generics, interfaces, classes, type narrowing, utility types, tsconfig, and more
Created byTech Coach
Last updated 11/2026
English

What you'll learn

  • TypeScript type system: basic and literal types, type inference, unions, type aliases, and how structural typing and type erasure work.
  • Work confidently with functions, objects, interfaces, classes, access modifiers, inheritance, abstract classes, and enums in real TypeScript code.
  • Apply generics, constraints, keyof and index types, mapped and conditional types, and built-in utility types like Partial, Pick, Omit, and Record.
  • Narrow types safely with guards and discriminated unions, and configure tsconfig, modules, declaration files, decorators, and the tooling ecosystem.

Included in This Course

452 questions
  • Fundamentals & the Type System73 questions
  • Functions, Objects & Interfaces71 questions
  • Classes, Enums & OOP77 questions
  • Generics & Advanced Types75 questions
  • Type Narrowing, Guards & Safety73 questions
  • Configuration, Modules, Tooling & Ecosystem83 questions

Description

Test 1, what an alias names, literal and template literal types, bigint, contextual typing, widening under let against const and as const, tuple destructuring, and erasure as it shows up in namespaces, useDefineForClassFields, isolatedDeclarations and @ts-expect-error

Test 2, parameter lists checked by position, optional against defaulted parameters, this parameters and rest arrays, overload signatures against the implementation, index signatures, readonly depth and one-way array assignability, intersections, the excess property check and the variable that removes it, declaration merging

Test 3, visibility and what private leaves at runtime, parameter properties, field initialisation order, accessors and static members, abstract classes and override under noImplicitOverride, super before this, strictPropertyInitialization against the definite assignment assertion, and numeric, string, const and ambient enums with their reverse mappings

Test 4, constraints and inference from arguments, keyof and typeof, conditional types with infer, distribution stopped by [T] extends [U], mapped modifiers added with +readonly or removed with -?, key remapping through as, and the utilities built on them: Partial, Pick, Record, Exclude, Parameters, ReturnType, InstanceType

Test 5, typeof, instanceof and in guards, typeof null, truthiness and equality narrowing, ?? against ||, ?. along a chain, written and inferred type predicates, assertion functions with asserts, satisfies, the non-null assertion, discriminated unions, and a never assignment that fails when a member is added

Test 6, the strict flags and the defaults 6.0 changed, module against script and export {}, type-only imports, module and moduleResolution values including node16 and bundler, noEmit next to a bundler, declaration output, skipLibCheck, project references, ambient modules such as declare module 'some-lib', and decorators under both proposals

Defaults are given with the release that owns them. 6.0 turned strict on by default and changed the module, target and rootDir defaults; 7.0 is the native port that drops what 6.0 deprecated; standard decorators date from 5.0 while experimentalDecorators still selects the older API. Where a release decides an answer, the item or its explanation names that release.

Pairs that are easy to conflate get an item that separates them, and the explanation says which side applies: unknown against any, a type predicate against an assertion function, an interface against a type alias, node16 against bundler.

Who this course is for:

  • JavaScript and TypeScript developers who want to validate and strengthen their practical TypeScript skills, along with anyone preparing for technical interviews or job assessments that cover TypeScript. The 300 code-based questions, each with a detailed explanation for every answer choice, suit both developers new to TypeScript who want to build a solid foundation and experienced developers looking to find and close gaps in advanced areas like generics, conditional types, and type narrowing. Because the questions include real TypeScript code and target TypeScript 5.x, they fit anyone who wants to deepen genuine understanding rather than memorize facts.