示例工程 18-iife-module-pattern
18-iife-module-pattern/03-namespace-output/legacy/ui.ts
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
// 用 namespace 写的库(脚本模式编译)
namespace LegacyUI {
export const version = '1.0.0';
export function boot(): string {
return `boot:${version}`;
}
export namespace Theme {
export const name = 'light';
}
}