Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumTypeScriptfunction overloadsSingle-choice MCQ

With these overloads, what is the type of `v` when called with a literal argument, and why?

function get(key: string): "GENERAL"; function get(key: "id"): "SPECIFIC"; function get(key: string): any { return ""; } const v = get("id");