TSConfig

noImplicitReturns

When enabled, TypeScript will check all code paths in a function to ensure they return a value.

ts
function lookupHeadphonesManufacturer(color: "blue" | "black"): string {
Function lacks ending return statement and return type does not include 'undefined'.2366Function lacks ending return statement and return type does not include 'undefined'.
if (color === "blue") {
return "beats";
} else {
"bose";
}
}
Try