Courses
TypeScript Advanced: Types That Hold Up in Production
Final Check: TypeScript Advanced
Fifteen scenario questions across the whole course. If you get twelve or more right, you can design types, declarations and a migration path for a codebase that other people also work in.
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 see IsString of boolean or string give "no" or "yes", while a version with both sides of extends wrapped in square brackets gives "no". What explains the difference?
2.
A helper returns the value a function resolves to, whether the function returns a promise or not. What is the readable way to write it?
3.
Why is ElementOf of number, defined with infer and a never branch, a quiet problem?
4.
What happens when you add the string "archived" to the Action union in a mapped type that renames keys with as and a template literal type?
5.
Two ids are branded string types, UserId and OrderId. Which call does the compiler reject?
6.
Why does "anything" as UserId weaken a branded type?
7.
A config object is written with as const and then checked with satisfies Record of string to a path pattern. What do you get?
8.
A teammate writes a .d.ts and wants to be sure it matches the JavaScript. What is the practical answer?
The compiler compares them every build and reports differences.
Put any in every signature so no difference can appear.
Generate the declaration once and never edit it.
The compiler does not compare them. Add a small test file with calls that should compile and calls that should fail, and run tsc in CI.
9.
A declaration file adds a global property with declare global, and the compiler refuses it. What do you add?
10.
You augment the Express request with an optional user property, using declare module. Which module name goes in the block, and what must the file have?
11.
The app project references shared with composite on, and the root tsconfig has files set to an empty list and lists both projects. You change a property name in shared and run tsc -b. What do you expect?
12.
On a codebase where type-aware linting finds hundreds of problems, what is the adoption plan that works?
Turn on every rule as an error and fix everything in one pull request.
Start with the rules as warnings, count them by rule, set a ceiling with max-warnings, then fix and promote one rule at a time.
Switch off type information so that fewer rules fire.
Run eslint with the fix option over the whole repository.
13.
Under allowJs without checkJs, a TypeScript file imports a function from a JavaScript file with a JSDoc comment of number for a parameter. How does the compiler treat the JavaScript file?
14.
Types in a project jump from about 350 to more than 11,000 after adding one short file. Which tool shows where the cost comes from?
15.
A tsconfig has no include and the project reads 302 of your own files, although only one is application code. What do you do first?
About
Fifteen scenario questions across the whole course. If you get twelve or more right, you can design types, declarations and a migration path for a codebase that other people also work in.
- Duration
- 15 min
- Last update
- 10/02/2026
Was this helpful?
0
0
Comments (0)
Sign in to commentNo comments yet.