Bug Report
🔎 Search Terms
switch incorrectly narrows type
🕗 Version & Regression Information
v4.3.5
⏯ Playground Link
Playground link with relevant code
💻 Code
const symbol = Symbol("Test");
function f(x: 1 | "a" | typeof symbol | {} | (() => void)): void {
switch (typeof x) {
case "number":
case "object":
case "string":
case "symbol":
}
switch (typeof x) {
case "function":
case "object":
case "string":
case "symbol":
}
switch (typeof x) {
case "function":
case "number":
case "string":
case "symbol":
}
switch (typeof x) {
case "function":
case "number":
case "object":
case "symbol":
}
switch (typeof x) {
case "function":
case "number":
case "object":
case "string":
}
switch (typeof x) {
case "function":
case "number":
case "object":
case "string":
case "symbol":
}
}
🙁 Actual behavior
Starting from 4th switch the type of x is narrowed to {}.

🙂 Expected behavior
The type of x should not be narrowed
Bug Report
🔎 Search Terms
switch incorrectly narrows type
🕗 Version & Regression Information
v4.3.5
⏯ Playground Link
Playground link with relevant code
💻 Code
🙁 Actual behavior
Starting from 4th switch the type of x is narrowed to {}.
🙂 Expected behavior
The type of x should not be narrowed