← TypeScript Type Narrowing: The Complete GuideQuiz

TypeScript Type Narrowing

Test what you just learned about control flow analysis, typeof/instanceof/in guards, discriminated unions, type predicates, and the closure and generic gotchas that trip people up.

questions8
pass mark70%
resultsat the end

No account needed. Answer all 8 questions, then see your score with every answer explained and a reference to the spec or MDN — pass and you can claim a certificate.