Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardTypeScriptdeclaration mergingSingle-choice MCQ

A function declaration and a namespace of the same name merge so the function gets static-like properties. What does this rely on, and what is the type of `lib.version`?

function lib(x: number): number { return x; } namespace lib { export const version = "1.0"; } const v = lib.version;