never in Intersection Types
What you'll learn: How intersecting incompatible types like string & number produces never, representing an impossible type.
The Core Idea
When you create an intersection type, you're asking TypeScript to combine types into one that satisfies all the parts simultaneously. Usually this works great with object types — you get an object with all the properties.
But what happens when you intersect two types that can never overlap?
type Impossible = string & number;
A value can't be both a string and a number at the same time. TypeScript recognizes this impossibility and resolves the intersection to never — the type that represents "this can never exist."
Why This Happens
Think of intersection as the logical "AND" operation on types. With objects, you're combining properties. But with primitives like string and number, you're asking: "What values are in the set of strings AND in the set of numbers?"
The answer is: none. The sets don't overlap. No value can satisfy both constraints, so TypeScript correctly identifies this as never.
Common Examples
type Contradiction = string & number; // never
type AlsoImpossible = boolean & "hello"; // never
type StillNever = 42 & "hello"; // never
This also happens with conflicting object properties:
type Conflict = { id: string } & { id: number };
// Results in: { id: never }
The id property must be both string and number — impossible, so it becomes never.
Key Takeaway: Intersecting incompatible types produces never because no value can satisfy contradictory requirements simultaneously. This is TypeScript's way of signaling a logical impossibility in your type system.