← Fullstack with Vue.jsQuestion 22 of 62
What is type narrowing?
📘 Explanation
Type narrowing is when TypeScript refines a union type to a more specific type based on checks like typeof or in at runtime. It's not about explicit casting with as, converting types to JavaScript primitives at compile time, or removing unused types for performance—those aren't what narrowing means.
Related questions
← PreviousNo login needed