Files
scriptc/tests/diagnostics/ns-import-object/main.ts
T
2026-07-22 18:08:04 -05:00

10 lines
359 B
TypeScript

// The module namespace OBJECT as a first-class value: member accesses
// resolve statically (lib.one() compiles), but Node's frozen,
// alphabetically-keyed namespace object is not materialized — storing,
// passing, or iterating it fences by name.
import * as lib from "./lib.ts";
console.log(lib.one());
const grabbed = lib;
console.log(grabbed.one());