Courses
TypeScript Advanced: Types That Hold Up in Production
Check Yourself: Types That Compute
Five scenario questions on conditional types, infer and template literal types. If you miss more than one, reread the lessons in this section.
Course content
Join this Course
Sign in to save your progress.
-
Types That Compute
-
Conditional Types and infer Without Nested Nightmares
-
Template Literal Types for Routes and Event Names
-
-
-
Brands and Boundaries
-
Branded Types So IDs Don't Mix
-
satisfies and const Assertions When Inference Isn't Enough
-
-
-
Declare What JavaScript Didn't
-
Writing .d.ts for a Plain JS Module
-
Ambient Modules and Global Augmentation Without Breaking Everything
-
-
-
Projects That Scale
-
Project References and Solution-Style tsconfig
-
typescript-eslint Rules That Catch Real Mistakes
-
-
-
Migrate and Keep Moving
-
Move a JavaScript Folder to TypeScript Without a Big Bang
-
allowJs, checkJs and Leaving JSDoc Behind
-
Keep Build Times Sane: incremental and What Actually Slows tsc
-
-
- Final Check: TypeScript Advanced
1.
You write type IsString of T as T extends string ? "yes" : "no". What is IsString of the union string or number?
2.
What does the line type ElementOf of T as T extends (infer U)[] ? U : never give for ElementOf of string[]?
3.
A conditional type is nested three levels deep and nobody can read it. What is the recommended fix?
4.
You build the union of event names from two unions, 10 entities and 10 actions, with a template literal type. How many string types does it contain, and what is the risk as the lists grow?
100, because the members multiply, and a few larger lists can pass the compiler's limit and give error TS2590.
10, because the compiler removes duplicates in the second list.
20, because the members of the two lists are added together.
100, and there is no limit, because types are erased at run time.
5.
Which statement about a template literal type such as a route pattern starting with /users/ and ending with a number is true?
About
Five scenario questions on conditional types, infer and template literal types. If you miss more than one, reread the lessons in this section.
- Duration
- 5 min
- Last update
- 10/11/2026
Was this helpful?
0
0
Comments (0)
Sign in to commentNo comments yet.