类型系统基础
类型系统高阶
模块组织史与工程
前端平台类型
工程化与综合
21-commonjs-snapshot
21-commonjs-snapshot/01-cjs-shim/cjs/math.ts
typescript · 0.1 KB
运行:21 · cjs-shim
点击「运行示例」后,左侧显示源码、右侧显示运行结果;console 输出会实时回传。
console
// CJS 模块:导出对象 function add(a: number, b: number): number { return a + b; } const math = { add }; export = math;
该文件由构建期采集,未做任何改写;源码页不进入搜索引擎索引。