Course contentsShow
TypeScript
Lesson 205 of 1,7965. Type Narrowing FundamentalsPro lesson

Comparing Against Literal Values

How checking x === 'specific-value' narrows string literal unions to a single type.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.