Skip to main content
Frontend & Core Web

TypeScript 5+ & Type System Skill Assessment Quiz (2026)

15 Questions15 MinsPass: 80%

Test your mastery of TypeScript generics, conditional types, template literal types, discriminated unions, type narrowing, and satisfies.

Question 1 of 150% Completed
Single Choice

What is the difference between `any` and `unknown` in TypeScript?

Select an option above

TypeScript: Assessment Scope & Sample Focus Areas

15 questions • 80% pass target

This interactive technical assessment checks your practical understanding of TypeScript (Frontend & Core Web) across syntax behavior, edge cases, and architectural decisions.

Topic 1 of 15

What is the difference between `any` and `unknown` in TypeScript?

Topic 2 of 15

Why is the `satisfies` operator preferred over an explicit type annotation (`const x: T = ...`) in many scenarios?

Topic 3 of 15

What is a 'Discriminated Union' in TypeScript and how does the compiler use it?

Topic 4 of 15

What does the utility type `Pick<T, K>` do?

Topic 5 of 15

What does the `never` type represent in TypeScript?

Topic 6 of 15

What is the return type of `type T = Awaited<Promise<Promise<string>>>`?

Frequently Asked Questions

TypeScript Assessment: Key Technical Questions & Answers

5 Questions Answered
1What is the difference between TypeScript `unknown`, `any`, and `never` types?
`any` turns off all type-checking, allowing arbitrary property access and assignments, propagating type unsafety across the codebase. `unknown` is the type-safe counterpart to `any`: any value can be assigned to `unknown`, but TypeScript forbids performing operations on it until it is narrowed via type guards or assertions. `never` represents the return type of functions that never return (infinite loops, throwing exceptions) or unreachable branches in exhaustive pattern matching.
2How do TypeScript Mapped Types and Conditional Types (`infer`) create dynamic utilities?
Mapped Types (`{ [K in keyof T]: T[K] }`) iterate over keys to transform types (powering `Partial<T>`, `Readonly<T>`). Conditional Types (`T extends U ? X : Y`) select types based on type relationships. The `infer` keyword inside a conditional type extracts and captures a type variable dynamically (e.g. `type ReturnType<T> = T extends (...args: any[]) => infer R ? R : any`).
3What is the difference between `interface` and `type` alias in modern TypeScript?
`interface` defines the shape of objects and supports Declaration Merging (multiple interface declarations with the same name merge their properties), making interfaces preferred for public libraries and OOP models. `type` aliases can declare unions (`type Status = 'open' | 'closed'`), primitives, tuples, and mapped types. Modern TypeScript performs identically regarding performance for object shapes, so consistency within a team is paramount.
4How do User-Defined Type Guards (`arg is Type`) and Discriminated Unions enforce type safety?
A Type Guard function returns a type predicate (`value is string`); inside downstream `if` blocks, TypeScript narrows the variable's type automatically. A Discriminated Union uses a common literal property (the 'discriminant', e.g. `{ kind: 'circle', radius: number } | { kind: 'square', side: number }`) allowing `switch` or `if` statements to narrow the variant exhaustively with compiler verification.
5What is Structural Typing (Duck Typing) and how does it differ from Nominal Typing?
TypeScript uses Structural Typing: type compatibility is determined entirely by an object's shape and members, not its explicit declaration or class hierarchy. If Type A has all the properties required by Type B with compatible types, Type A can be assigned to Type B. Nominal typing (used in Java/C#) requires explicit class inheritance or interface implementation regardless of identical property shapes.

Next Steps for Mastery

Reinforce your knowledge with cheatsheets, interactive sandboxes, and interview prep.