← Back to archive

Stdle #80 · namespaces · 2026-08-25

What does this TypeScript snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

namespace A { export namespace B { export const q = 4 } }
import AB = A.B
console.log(AB.q)
Namespaces
4 attempts left

Answer & explanation