Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardTypeScriptunion and literal typesSingle-choice MCQ1 views

What is the inferred return type of f?

function f(x: boolean) { return x ? 1 : "a"; }